Jump to content
Sign in to follow this  
photonbuddy

AutoIT tray icon stealing focus.

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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 :(

Share this post


Link to post
Share on other sites

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 !

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...