KurogamineNox Posted June 19, 2010 Share 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? Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 19, 2010 Share 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 Link to comment Share on other sites More sharing options...
KurogamineNox Posted June 20, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 21, 2010 Share 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 Link to comment Share on other sites More sharing options...
KurogamineNox Posted June 22, 2010 Author Share 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. 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