photonbuddy Posted May 30, 2005 Share Posted May 30, 2005 Hi All, I have been working on a script, but I am having a problem. I want to first check if a window is active before proceeding to run the rest of the script. Problem is, AutoIT tray icon steals focus, so the window is not active when I test for it. Is there any way around this? Link to comment Share on other sites More sharing options...
the_lord_mephy Posted May 30, 2005 Share Posted May 30, 2005 Do you mean like If WinActive("TITLE") = 0 Then WinActivate("TITLE") EndIf ? My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
photonbuddy Posted May 30, 2005 Author Share Posted May 30, 2005 Kinda. I have a script assigned to one of the buttons on my multimedia keyboard that does some funky stuff if it doesn't operate within the intended window, so I want something like this: If WinActive("TITLE") = 0 Then Exit Endif But the window loses it's active status when the script runs Link to comment Share on other sites More sharing options...
photonbuddy Posted May 31, 2005 Author Share Posted May 31, 2005 Any ideas? Anyone? Link to comment Share on other sites More sharing options...
Helge Posted May 31, 2005 Share Posted May 31, 2005 I find it weird that the "AutoIT tray icon stealing focus", but anyway.. You could try to add the following command to the top of your script : #NoTrayIcon Good luck ! Link to comment Share on other sites More sharing options...
photonbuddy Posted June 1, 2005 Author Share Posted June 1, 2005 Thanks for the suggestion. Sadly, focus still leaves the main program, although the tray icon doesn't show. I have a sneaking suspician it may be the keyboard driver software that takes focus away when a program is launched from a hotkey Will keep trying to figure it out. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now