Sign in to follow this  
Followers 0
AU3Newbie

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

5 posts in this topic

The same as title.

i.e.How to use regexp at win-title?

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
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

:)

Share this post


Link to post
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?

Share this post


Link to post
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!!!

Share this post


Link to post
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
Sign in to follow this  
Followers 0