Jump to content
Sign in to follow this  
OiMunk

Newb Q: Select: parts of a string

Recommended Posts

OiMunk

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
LOULOU

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.