n9mfk9 Posted March 20, 2008 Share Posted March 20, 2008 Hi all im trying to click the cancel on a outlook express spelling window i tried WinWaitActive("Spelling") ControlClick("Spelling", " ", "[CLASS:Button9; TEXT:Cancel") ControlClick("Spelling", "", "[CLASS:Button9; TEXT:Cancel; INSTANCE:1]") ControlClick("Spelling", "", "[CLASS:Button; TEXT:Cancel; INSTANCE:9]") ControlClick("Spelling", "", "[CLASS:Button9; TEXT:Cancel; INSTANCE:9]") none work here the window info >>>> Window <<<< Title: Spelling Class: #32770 Position: 312, 358 Size: 407, 212 Style: 0x94C800C4 ExStyle: 0x00010101 Handle: 0x00030736 >>>> Control <<<< Class: Button Instance: 9 ClassnameNN: Button9 ID: 2 Text: Cancel Position: 326, 153 Size: 66, 23 ControlClick Coords: 55, 5 Style: 0x50010000 ExStyle: 0x00000004 Handle: 0x000107B4 >>>> Mouse <<<< Position: 696, 545 Cursor ID: 2 Color: 0xFAFAF9 >>>> StatusBar <<<< >>>> Visible Text <<<< Not In Dictionar&y: kgkjkkjkjkjkkk Change &To: kgkjkkjkjkjkkk Suggestio&ns: &Ignore I&gnore All &Change Change A&ll &Add &Suggest &Options... &Undo Last Cancel thanks Beau Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 20, 2008 Moderators Share Posted March 20, 2008 This doesn't work?ControlClick("[REGEXPTITLE:(?i).*?Spelling.*?]", " ", "Button9") Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
n9mfk9 Posted March 20, 2008 Author Share Posted March 20, 2008 that works were can i find info on REGEXPTITLE thanks Beau Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 20, 2008 Moderators Share Posted March 20, 2008 that works were can i find info on REGEXPTITLEthanks BeauWell, in windows advanced in the help file there is REGEXPTITLE option... but it's Regular Expressions, if you don't know how to use them then you would need to learn.http://www.regular-expressions.info/characters.htmlhttp://www.cs.tut.fi/~jkorpela/perl/regexp.html Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
n9mfk9 Posted March 20, 2008 Author Share Posted March 20, 2008 Well, in windows advanced in the help file there is REGEXPTITLE option... but it's Regular Expressions, if you don't know how to use them then you would need to learn. http://www.regular-expressions.info/characters.html http://www.cs.tut.fi/~jkorpela/perl/regexp.htmlSmooke_N what did i do wrong ControlClick("[REGEXPTITLE:(?i).*?Outlook Express.*?]", " ", "Button1") window info >>>> Window <<<< Title: Outlook Express Class: #32770 Position: 350, 251 Size: 443, 126 Style: 0x94C803C5 ExStyle: 0x00010101 Handle: 0x005105BA >>>> Control <<<< Class: Button Instance: 1 ClassnameNN: Button1 ID: 6 Text: &Yes Position: 140, 60 Size: 75, 23 ControlClick Coords: 51, 10 Style: 0x50030001 ExStyle: 0x00000004 Handle: 0x001905BC >>>> Mouse <<<< Position: 544, 350 Cursor ID: 2 Color: 0xF4F4F0 >>>> StatusBar <<<< >>>> Visible Text <<<< &Yes &No The spell check on this document was halted. Do you want to send anyway? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 20, 2008 Moderators Share Posted March 20, 2008 ControlClick("[REGEXPTITLE:(?i).*?Outlook Express.*?]", " ", "Button1")Space for text? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
n9mfk9 Posted March 20, 2008 Author Share Posted March 20, 2008 ControlClick("[REGEXPTITLE:(?i).*?Outlook Express.*?]", " ", "Button1") Space for text?autoit hangs beau Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 20, 2008 Moderators Share Posted March 20, 2008 autoit hangsbeauThe sky is blue. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
n9mfk9 Posted March 20, 2008 Author Share Posted March 20, 2008 If i use this line autoit hangs ControlClick("[REGEXPTITLE:(?i).*?Outlook Express.*?]", " ", "Button1") what did i do wrong Beau Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 20, 2008 Moderators Share Posted March 20, 2008 If i use this line autoit hangs ControlClick("[REGEXPTITLE:(?i).*?Outlook Express.*?]", " ", "Button1") what did i do wrong BeauI told you... you have a space in the text parameter, " " should be "". If it still hangs... restart your PC because I have no idea. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
MHz Posted March 21, 2008 Share Posted March 21, 2008 Outlook Express has hidden windows with similar titles. You may need to use the Class as mentioned here. Advanced title/text syntax has changed since then so modify to suit. Link to comment Share on other sites More sharing options...
maroesjk Posted March 21, 2008 Share Posted March 21, 2008 Maybe it's a stupid question, but do you have the line AutoItSetOption('WinTitleMatchMode', 4) in your script? You are using Advanced Window Descriptions, so it should be in your script to make it work! Link to comment Share on other sites More sharing options...
MHz Posted March 21, 2008 Share Posted March 21, 2008 Maybe it's a stupid question, but do you have the line AutoItSetOption('WinTitleMatchMode', 4) in your script? You are using Advanced Window Descriptions, so it should be in your script to make it work!Option 4 is used for backward compatibility with older syntax of Advanced title/text usage. The newer syntax using "[...]" does not require an option to enable Advanced title/text usage. 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