Open File - Security Warning

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

cwink
Newbie
Posts: 14
Joined: Tue Dec 05, 2006 8:15 pm

Open File - Security Warning

Post by cwink » Fri Dec 08, 2006 2:34 pm

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

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Dec 08, 2006 2:45 pm

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

cwink
Newbie
Posts: 14
Joined: Tue Dec 05, 2006 8:15 pm

Post by cwink » Fri Dec 08, 2006 3:05 pm

I tried that out, doesn't work :?

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Dec 08, 2006 3:12 pm

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.

cwink
Newbie
Posts: 14
Joined: Tue Dec 05, 2006 8:15 pm

Post by cwink » Fri Dec 08, 2006 3:28 pm

Didn't work either :oops:

... i'm totally stumped. Neither did this work...


ExecuteFile>[path]
Wait>20
Press Tab
Press Tab
ect....

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Dec 08, 2006 3:32 pm

When you say "didn't work either" what do you mean? Did you or did you not see the tabs moving through the error window? Is the error window getting focus?

cwink
Newbie
Posts: 14
Joined: Tue Dec 05, 2006 8:15 pm

Post by cwink » Fri Dec 08, 2006 3:36 pm

Sorry, forgot to mention that, yes, the window is focused. I can tab and everything.

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Dec 08, 2006 3:47 pm

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?

cwink
Newbie
Posts: 14
Joined: Tue Dec 05, 2006 8:15 pm

Post by cwink » Fri Dec 08, 2006 3:51 pm

Yesssssir

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Dec 08, 2006 3:55 pm

Hmmmmmm.

If at that point you manually press enter, does the window close?

I'm wondering if the tabs are not getting you to the correct position.

cwink
Newbie
Posts: 14
Joined: Tue Dec 05, 2006 8:15 pm

Post by cwink » Fri Dec 08, 2006 3:56 pm

Well, if i press enter at that point, it cancles. The default starting button is cancel, so it's not even moving when the "Press Tab" command is active. I have NO clue why it's not doing it.

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Dec 08, 2006 4:03 pm

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

cwink
Newbie
Posts: 14
Joined: Tue Dec 05, 2006 8:15 pm

Post by cwink » Fri Dec 08, 2006 4:11 pm

Nope, none of that works... but i happend upon something interesting...

I accidently left the macro running after i had closed out the dialog, and then ran the macro again (the other was still running)... and it bypassed the dialog... my question is why?

cwink
Newbie
Posts: 14
Joined: Tue Dec 05, 2006 8:15 pm

Post by cwink » Fri Dec 08, 2006 4:12 pm

Bypass was the wrong word, i mean the macro didn't hang, it continued.

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Fri Dec 08, 2006 4:19 pm

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

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts