AU3Newbie Posted January 13, 2007 Share Posted January 13, 2007 The same as title. i.e.How to use regexp at win-title? Link to comment Share on other sites More sharing options...
jpm Posted January 13, 2007 Share Posted January 13, 2007 The same as title.i.e.How to use regexp at win-title?not really you have to follow the regexp definition see StringRegExp flag=0 as the answer will be true or not. Link to comment Share on other sites More sharing options...
MHz Posted January 13, 2007 Share Posted January 13, 2007 Here is an exampleOpt('WinTitleMatchMode', 4) Opt('WinWaitDelay', 2000) For $i = 1 To 10 Switch Random(1, 3, 1) Case 1 RunWait('explorer "' & @ProgramFilesDir & '"') Case 2 RunWait('explorer "' & @WindowsDir & '"') Case 3 RunWait('explorer "' & @SystemDir & '"') EndSwitch If Not WinWait('regexp=(?i)program files|windows|system32', '', 3) Then ExitLoop $title = WinGetTitle('regexp=(?i)program files|windows|system32') WinClose($title) Nextand another herehttp://www.autoitscript.com/forum/index.ph...st&p=293101 Link to comment Share on other sites More sharing options...
AU3Newbie Posted January 13, 2007 Author Share Posted January 13, 2007 not really you have to follow the regexp definition see StringRegExp flag=0 as the answer will be true or not.I've tried some times,such as: Opt("WinTitleMatchMode",4) WinActivate("regexp=[a-Z ]");doesnot work ;WinActivate("regexp=([a-Z ])");doesnot work ;WinActivate("regexp=stringregexp("",[a-Z ])");doesnot work ;WinActivate("regexp=^Auto");doesnot work WinActivate("AutoIt Help");works ;WinActivate("classname=HH Parent");works how to write my regexp expressions in it? Link to comment Share on other sites More sharing options...
AU3Newbie Posted January 13, 2007 Author Share Posted January 13, 2007 Here is an example Opt('WinTitleMatchMode', 4) Opt('WinWaitDelay', 2000) For $i = 1 To 10 Switch Random(1, 3, 1) Case 1 RunWait('explorer "' & @ProgramFilesDir & '"') Case 2 RunWait('explorer "' & @WindowsDir & '"') Case 3 RunWait('explorer "' & @SystemDir & '"') EndSwitch If Not WinWait('regexp=(?i)program files|windows|system32', '', 3) Then ExitLoop $title = WinGetTitle('regexp=(?i)program files|windows|system32') WinClose($title) Next and another here http://www.autoitscript.com/forum/index.ph...st&p=293101 thank you very much!!! 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