Jump to content

IS there any examples about title-match-mode-4 on "regexp=REGEXP"


Recommended Posts

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

:)

Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...