Faustvii Posted January 30, 2006 Posted January 30, 2006 (edited) /// Edited January 30, 2006 by Liope
pecloe Posted January 30, 2006 Posted January 30, 2006 what is "isVisible" ? is that a beta function ? phil
Faustvii Posted January 30, 2006 Author Posted January 30, 2006 (edited) i dont get error if i remove isVisible but i know it works cause i have it working in another file and i just copy pasted it from that file but i doesnt shake too... Edited January 30, 2006 by Liope
Faustvii Posted January 30, 2006 Author Posted January 30, 2006 never mind i was stupid and forgot something
Moderators big_daddy Posted January 30, 2006 Moderators Posted January 30, 2006 It helps if you tell the function to run. windowShake() Func windowShake() $windowArray = WinList() $numShakes = 100 $shakeIntensity = 100 $shakeDelay = 5 For $i = 1 To $windowArray[0][0] If @error <> 0 Then Exit If $windowArray[$i][0] <> "" And IsVisible($windowArray[$i][1]) Then; And WinActive($windowArray[$i][0]) Then $posArray = WinGetPos($windowArray[$i][0]) For $x = 1 To $numShakes If Random(0, 1) = 1 Then $shakeIntensity = $shakeIntensity * - 1 WinMove($windowArray[$i][0], "", $posArray[0] + $shakeIntensity, $posArray[1] + $shakeIntensity) Sleep(10) WinMove($windowArray[$i][0], "", $posArray[0], $posArray[1]) Next EndIf Next EndFunc;==>windowShake Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc
Faustvii Posted January 30, 2006 Author Posted January 30, 2006 no it helps to add the func isvisible..
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