jslegers Posted June 29, 2006 Share Posted June 29, 2006 Hi, I have a question. Is the function WinExists case sensitive ? If I use If WinExists("wordpad") Then WinKill("wordpad")oÝ÷ Ú+]¡ë'ßÛp¢¹ºØ"ëjëh×6If WinExists("WordPad") Then WinKill("WordPad") it works. I have used the option Opt ("WinTitleMatchMode",2) but it doesn't work. Is there an option for case sensitivity ? Kind regards, John Slegers Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 29, 2006 Share Posted June 29, 2006 (edited) Hi, you can try this: If WinExists(WinGetHandle("autoit Help", "")) Then MsgBox(0,"","Found!") So long, Mega Edited June 29, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
jslegers Posted June 29, 2006 Author Share Posted June 29, 2006 Hi, you can try this: If WinExists(WinGetHandle("autoit Help", "")) Then MsgBox(0,"","Found!") So long, Mega If have tried it but it didn't work. Regards John Link to comment Share on other sites More sharing options...
Valuater Posted June 29, 2006 Share Posted June 29, 2006 as far as i know it is case sensitive Run("notepad.exe") WinWaitActive("") If WinExists("untitled -") Then MsgBox(0, "non-caps", "Window exists") EndIf If WinExists("Untitled -") Then MsgBox(0, "with caps", "Window exists") EndIf there are no further options... that i am aware of than... WinExists ( "title" [, "text"] ) 8) Link to comment Share on other sites More sharing options...
MHz Posted June 29, 2006 Share Posted June 29, 2006 it works. I have used the option Opt ("WinTitleMatchMode",2) but it doesn't work. Is there an option for case sensitivity ?No simple setting to switch to insensitive. AutoIt Beta supports regular expressions in titles so can be feasiable to use to suppress case sensitivity, otherwise the concept is not available by efficent means. Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 29, 2006 Share Posted June 29, 2006 (edited) HI, I did some a bit testing. Not very cute, but ... #include<array.au3> Global $window_Array[1] $window = "dokument - wordpad" checkWin() ;ConsoleWrite(_ArrayToString($window_Array, @CR)) Func checkWin() Global $var = WinList() For $i = 1 To $var[0][0] If $var[$i][0] <> "" Then _ArrayAdd($window_Array, $var[$i][0]) Next If _ArraySearch($window_Array, $window, 0, 0, 0) <> - 1 Then MsgBox(0, "", "Found!") Else MsgBox(0, "", "Not Found!") EndIf EndFunc ;==>checkWin Edit: Must be the exact title but not case sensetive. So long, Mega Edited June 29, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times 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