phew Posted May 13, 2007 Share 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? Link to comment Share on other sites More sharing options...
poisonkiller Posted May 13, 2007 Share 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 Link to comment Share on other sites More sharing options...
phew Posted May 13, 2007 Author Share 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 Link to comment Share on other sites More sharing options...
Administrators Jon Posted May 13, 2007 Administrators Share Posted May 13, 2007 You can also use regular expressions in window titles in order to do wildcard (or more complicated) matches. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
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