KurogamineNox 0 Posted June 19, 2010 How to check and activate commands only when active window has specific words in them. Windows that have different words in them sometimes like Untitled - Notepad Example1 - Notepad Only when active window has Notepad in it? Share this post Link to post Share on other sites
PsaltyDS 39 Posted June 19, 2010 Check the help file under "Window Titles and Text (Advanced)", and the CLASS or RegExpTitle specifications. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
KurogamineNox 0 Posted June 20, 2010 Check the help file under "Window Titles and Text (Advanced)", and the CLASS or RegExpTitle specifications.Thank you, got what I needed using this codeOpt("WinTitleMatchMode", 2)withif WinActive("Chat Window","") = True Then Share this post Link to post Share on other sites
PsaltyDS 39 Posted June 21, 2010 The only thing I don't like about that method is that changes to Opt() options are persistent, and as you write longer, more complicated scripts, that kind of thing gets to be painful to keep track of: "Why isn't is recognizing that window? Did I forget to switch WinTitleMatchMode back somewhere, again?" Been there, done that. Using the advanced specifications allows each reference to be self contained and independent of that kind of thing. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
KurogamineNox 0 Posted June 22, 2010 The only thing I don't like about that method is that changes to Opt() options are persistent, and as you write longer, more complicated scripts, that kind of thing gets to be painful to keep track of: "Why isn't is recognizing that window? Did I forget to switch WinTitleMatchMode back somewhere, again?" Been there, done that.Using the advanced specifications allows each reference to be self contained and independent of that kind of thing.Ill take a look into that. Thank you. So far the Opt() is working for what I need at the moment but Ill take a look into it. Share this post Link to post Share on other sites