phew Posted May 13, 2007 Posted May 13, 2007 Hi, i got a problem with following code: $title = WinGetTitle("FileZilla") If ($title = "*verbunden*") Then MsgBox(0, "Title (Connected!)", $title) ElseIf ($title = "*version*") Then MsgBox(0, "Title (Not connected!)", $title) Else MsgBox(0, "Title", "error") EndIf i want to check with wildcards if the word "verbunden" or "version" is anywhere in the window's title but i got some problems with the wildcard thingy, i guess it doesnt accept the '*'s as wildcards in this function. any idea?
poisonkiller Posted May 13, 2007 Posted May 13, 2007 Try this: $title = WinGetTitle("FileZilla") If StringInStr($title, "verbunden") Then MsgBox(0, "Title (Connected!)", $title) ElseIf StringInStr($title, "version") Then MsgBox(0, "Title (Not connected!)", $title) Else MsgBox(0, "Title", "error") EndIf
phew Posted May 13, 2007 Author Posted May 13, 2007 Oh, thank you very much, i guess didn't read the F1-Help carefully, i was searching for something like this greetings
Administrators Jon Posted May 13, 2007 Administrators Posted May 13, 2007 You can also use regular expressions in window titles in order to do wildcard (or more complicated) matches.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now