Can't get focus on dialogbox (windows wlan)

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
nowind
Newbie
Posts: 10
Joined: Thu Jul 10, 2008 11:51 am

Can't get focus on dialogbox (windows wlan)

Post by nowind » Thu Jul 17, 2008 10:59 am

I'm creating a macro to temporarely auto-connect to a open wlan. All is well until the dialogbox wher you can cancel or - as I will - Connect Anyway. I've tried many things, some I have found on this forum, but I can not get this button clicked. The dialogbox has the same name as the underlying window...
Hope someone can help me with this.....

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Aug 03, 2008 7:40 am

How are you clicking on the button? Personally I try not to actually CLICK on it, but to send the shortcut key for it.

There are ways to deal with the fact that dialog box has the same name as the main window title. If you know when the dialog is about to appear you can use WaitWindowChanged to wait for it to appear no matter the title. Or sometimes a simple Wait> is good enough.

If you DON'T know when the dialog will appear but want to respond to it when it does you can use OnEvent. This may help:
http://www.mjtnet.com/blog/2008/03/04/o ... e-dialogs/

Feel free to post your code so that we can help further.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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