Jump to content


IfWin(Not)Exist/Active using tray icon instead of name


  • Please log in to reply
2 replies to this topic

#1 Davin

Davin
  • Guests

Posted 14 July 2004 - 11:58 PM

This one is a little obscure, but I think that in some cases it would help the script be *absolutely sure* that the intended window is the correct one. (prevents partial match foo, like reading a website about the game you're playing and having the web browser match instead!)

Basicly, you specify the filepath to to an *.ico file (you may have to extract it from the .exe). If the name, AND the icon matches, then the condition returns true.

#2 Davin

Davin
  • Guests

Posted 14 July 2004 - 11:59 PM

Also the name "tray icon" might be a little misleading, I meant to say "task bar icon".

#3 Chris

Chris
  • Administrators
  • 10727 posts

Posted 15 July 2004 - 12:29 AM

Instead, it's better to use WinGetClass or to activate the window using WinActivate ahk_class ClassName. That will ensure the right type of window is activated.