Jump to content

Newb Q: Select: parts of a string


OiMunk
 Share

Recommended Posts

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

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

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...