Sign in to follow this  
Followers 0
OiMunk

Newb Q: Select: parts of a string

3 posts in this topic

Each case is for a different Window, but the script needs to know which window. The only difference between these Windows are their Titles, but only half the characters in the Window title stay consistent. Is there some kind of wildcard character I can use? thanks,

Opt("WinTitleMatchMode", 2)

$a = WinGetTitle("","")

Select

Case $a = "part of window title" ;

MsgBox(0,"","")

Case $a = "different window title snippet"

MsgBox(0,"","")

Case $a = ""

MsgBox(0,"","")

Case $a = ""

MsgBox(0,"","")

Case $a = ""

MsgBox(0,"","")

EndSelect

Share this post


Link to post
Share on other sites



Each case is for a different Window, but the script needs to know which window. The only difference between these Windows are their Titles, but only half the characters in the Window title stay consistent. Is there some kind of wildcard character I can use? thanks,

Opt("WinTitleMatchMode", 2)

$a = WinGetTitle("","")

Select

Case $a = "part of window title" ;

MsgBox(0,"","")

Case $a = "different window title snippet"

MsgBox(0,"","")

Case $a = ""

MsgBox(0,"","")

Case $a = ""

MsgBox(0,"","")

Case $a = ""

MsgBox(0,"","")

EndSelect

Use stringRexexp it's the right choice for you

Share this post


Link to post
Share on other sites

Super,

thanks

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