Alexxander Posted May 15, 2014 Share Posted May 15, 2014 hi im trying to make a simple hide / view script for wlm If WinGetState ("Windows Live Messenger","") = 23 Or 7 Or 37 or 21 Then WinSetState("Windows Live Messenger","",@SW_HIDE) Else WinSetState("Windows Live Messenger","",@SW_SHOW) EndIf this code s not working any ideas how to fix it ? Link to comment Share on other sites More sharing options...
jguinch Posted May 15, 2014 Share Posted May 15, 2014 (edited) try $state = WinGetState ("Windows Live Messenger","") If $state = 23 Or $state = 7 Or $state = 37 or $state = 21 Then ... or If WinGetState ("Windows Live Messenger","") = 23 Or WinGetState ("Windows Live Messenger","") = 7 Or WinGetState ("Windows Live Messenger","") = 37 or WinGetState ("Windows Live Messenger","") = 21 Then ... You must use BitAND to checks values. Look at the WinGetState in the help file Edited May 15, 2014 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
November Posted May 15, 2014 Share Posted May 15, 2014 (edited) Hi there, Try this in the begining of your script: Opt("WinTitleMatchMode", -1) Cheers Edited May 15, 2014 by November Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
Alexxander Posted May 15, 2014 Author Share Posted May 15, 2014 try $state = WinGetState ("Windows Live Messenger","") If $state = 23 Or $state = 7 Or $state = 37 or $state = 21 Then ... or If WinGetState ("Windows Live Messenger","") = 23 Or WinGetState ("Windows Live Messenger","") = 7 Or WinGetState ("Windows Live Messenger","") = 37 or WinGetState ("Windows Live Messenger","") = 21 Then ... didn't worker for me i believe the problem is in the numbers but yes my condition was wrong thanks ... Hi there, Try this in the begining of your script: Opt("WinTitleMatchMode", -1) Cheers also didn't worked... Link to comment Share on other sites More sharing options...
jguinch Posted May 15, 2014 Share Posted May 15, 2014 I edited my post. Look at the last line Alexxander 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
jdelaney Posted May 15, 2014 Share Posted May 15, 2014 (edited) Example using bitAnd #include <Array.au3> Local $aWindowState_A[4]=[1,2,4,16] Local $aWindowState_B[3]=[1,2,4] Local $aWindowState_C[3]=[1,4,32] Local $aWindowState_D[3]=[1,4,16] Local $aWindowState[4]=[$aWindowState_A,$aWindowState_B,$aWindowState_C,$aWindowState_D] $iWinState = WinGetState(HWnd("0x00000000003B103A")) ConsoleWrite("Window state=" & $iWinState & @CRLF) For $i = 0 To UBound($aWindowState) - 1 $aTemp = $aWindowState[$i] $bMatch = True For $j = 0 To UBound($aTemp)-1 If Not BitAND($iWinState, $aTemp[$j]) Then $bMatch = False ExitLoop EndIf Next ConsoleWrite("is state=[" & _ArrayToString($aTemp) & "]?: " & @TAB & $bMatch & @CRLF) Next or, this could do it...i like the granularity of the above, though. $state = WinGetState ("Windows Live Messenger","") Switch $state Case 23,7,37,21 ;do something EndSwitch Edited May 15, 2014 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. 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