Open File - Security Warning
Moderators: JRL, Dorian (MJT support)
Open File - Security Warning
Alright, here's another one:
I'm trying to do a macro that will install some printer drivers, and when it loads up the driver via ExecuteFile (or any other method), it pop ups with one of those security windows; then it hangs.
Why is this?
code:
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Press Tab
Press Tab
Press Tab
Press Tab
Press Tab
Press Enter
.......
And i can't use the Wait> command, it never works out right.
Thanks
I'm trying to do a macro that will install some printer drivers, and when it loads up the driver via ExecuteFile (or any other method), it pop ups with one of those security windows; then it hangs.
Why is this?
code:
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Press Tab
Press Tab
Press Tab
Press Tab
Press Tab
Press Enter
.......
And i can't use the Wait> command, it never works out right.
Thanks
Wait Never works out right....?
Try it anyway. It looks to me like your tabs and enter are taking place before the Security Warning window has come into focus. If adding this wait works and if one second is too long, you can experiment with making the wait value smaller. I think the smallest possible wait value is 0.001 seconds.
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Wait>1
Press Tab
Press Tab
Press Tab
Press Tab
Press Tab
Press Enter
Try it anyway. It looks to me like your tabs and enter are taking place before the Security Warning window has come into focus. If adding this wait works and if one second is too long, you can experiment with making the wait value smaller. I think the smallest possible wait value is 0.001 seconds.
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Wait>1
Press Tab
Press Tab
Press Tab
Press Tab
Press Tab
Press Enter
IS the window getting focus?
If you tab manually can you see the position of the tabs? If yes try putting a 1 second wait between each of the press tab statements. If you are actually working in the window you should see the different objects in the window highlight. If you can't see them highlight then perhaps your window is not getting focus.
Is there more than one 'Open File - Security Warning" window? Maybe you need to set WF_TYPE. See the help for WaitWindowClosed.
If you tab manually can you see the position of the tabs? If yes try putting a 1 second wait between each of the press tab statements. If you are actually working in the window you should see the different objects in the window highlight. If you can't see them highlight then perhaps your window is not getting focus.
Is there more than one 'Open File - Security Warning" window? Maybe you need to set WF_TYPE. See the help for WaitWindowClosed.
So just to be clear... you ran a script that looked something like this:
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Wait>10
Press Tab
Wait>1
Press Tab
Wait>1
Press Tab
Wait>1
Press Tab
Wait>1
Press Tab
Wait>1
Press Enter
You could see that the window had focus?
You could see the script moving focus from one window object to the next as the script tabbed though the window?
When the tabbing reached the "Ok" button or what ever the last button is, the Press Enter function failed to close the window?
Is all that correct?
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Wait>10
Press Tab
Wait>1
Press Tab
Wait>1
Press Tab
Wait>1
Press Tab
Wait>1
Press Tab
Wait>1
Press Enter
You could see that the window had focus?
You could see the script moving focus from one window object to the next as the script tabbed though the window?
When the tabbing reached the "Ok" button or what ever the last button is, the Press Enter function failed to close the window?
Is all that correct?
Have you tried the Pushbutton function? You need to use the name of the button I'm faking it in the example. look up PushButton in help
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Wait>10
PushButton>Open File - Security Warning,Cancel
Or will the window close and the executable continue if you simply press Esc Or possibly Ctrl+F4
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Wait>10
Press ESC
or
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Wait>10
Press CTRL
Press F4
Release CTRL
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Wait>10
PushButton>Open File - Security Warning,Cancel
Or will the window close and the executable continue if you simply press Esc Or possibly Ctrl+F4
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Wait>10
Press ESC
or
ExecuteFile>[pathtofile]
WaitWindowOpen>Open File - Security Warning
SetFocus>Open File - Security Warning
Wait>10
Press CTRL
Press F4
Release CTRL
If I could interject an idea. Could you turn on Logging and post the results of the log file here? Also, there are result variables for just about everything in MacroScript. so, WaitWindowOpen> then after it times out, have your script check the value of WW_RESULT. try something like:
WaitWindowOpen>SomeWindow
waitready>0
wait>1
if>WW_RESULT=FALSE
mdl>SomeWindow NOT Found
goto>END
else
do something useful....
endif
Label>END
WaitWindowOpen>SomeWindow
waitready>0
wait>1
if>WW_RESULT=FALSE
mdl>SomeWindow NOT Found
goto>END
else
do something useful....
endif
Label>END