Jump to content
Sign in to follow this  


Recommended Posts

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 by Liope

Share this post

Link to post
Share on other sites

It helps if you tell the function to run.

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)
                 WinMove($windowArray[$i][0], "", $posArray[0], $posArray[1])

Func IsVisible($handle)
  If BitAnd( WinGetState($handle), 2 ) Then 
    Return 1
    Return 0


Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...