Hi,
I'm new to the product and have created a couple of macros that automate the import of a csv file into MS Excel. Most of the time it seems to work fine but every now and again the macro stops at waitwindowopen>save as.
RunProgram>D:\Program Files\Microsoft Office\Office12\EXCEL.EXE D:\FTPRoot\LocalUser\user\price_comparison.csv
WaitWindowOpen>file01.csv*
press ALT
send>f
wait>1
send>f
wait>1
send>x
release ALT
wait>1
Waitwindowopen>Save As
SetFocus>Save As
wait>1
send>D:\DB001\test\file01.xlsx
wait>2
press ENTER
The frustrating thing is that it runs fine when I run the macro manually but when it runs at a scheduled time it often 'hangs' at the waitwindowopen point as if the save as window never appears ?
Any ideas ?
unreliable macro sometimes stops at waitwindowopen
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Is Windows logged in at the scheduled time? If it is locked or logged out or a screen saver is running then it will not "see" the Save As window because, well, it won't exist.The frustrating thing is that it runs fine when I run the macro manually but when it runs at a scheduled time it often 'hangs' at the waitwindowopen point as if the save as window never appears ?
See:
http://www.mjtnet.com/msfaq17.htm
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?