death pax Posted February 27, 2006 Share Posted February 27, 2006 (edited) Well, lately Ive been working on a chat client and I decided i should create the functionality of the "Nudge" on msn or "BUZZ!" on yahoo, so i made this simple function for all to enjoy! expandcollapse popup; ---------------------------------------------------------------------------- ; Shake Window ; Author: Death Pax <death_pax@msn.com> ; ; Script Function: ; Shake Window ; ; ---------------------------------------------------------------------------- #include <GUIConstants.au3> $Gui_Main = GUICreate("Shake Window", 400, 400) $Button_Shake = GUICtrlCreateButton("Shake Window", 24, 352, 121, 33, 0) $Button_Close = GUICtrlCreateButton("Close Window", 256, 352, 121, 33, 0) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_Close ExitLoop Case $msg = $Button_Shake _ShakeWindow($Gui_Main, 5) Case Else ;;;;;;; EndSelect WEnd Exit Func _ShakeWindow($Window,$ShakeAmount) $Win_pos=WinGetPos($Window) For $i=0 to 20 step 1 WinMove($Window,"", $Win_pos[0],$Win_pos[1]+$ShakeAmount) Sleep(10) WinMove($Window,"", $Win_pos[0]+$ShakeAmount,$Win_pos[1]) Sleep(10) WinMove($Window,"", $Win_pos[0],$Win_pos[1]-$ShakeAmount) Sleep(10) WinMove($Window,"", $Win_pos[0]-$ShakeAmount,$Win_pos[1]) Sleep(10) WinMove($Window,"", $Win_pos[0],$Win_pos[1]) Sleep(10) next EndFunc let me know what you think of it ^.^ Edited February 27, 2006 by death pax Link to comment Share on other sites More sharing options...
FuryCell Posted February 27, 2006 Share Posted February 27, 2006 cool. neat way of getting the users attention. nice job. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
greenmachine Posted February 27, 2006 Share Posted February 27, 2006 Just think how hard it would be to read something on the window as it's shaking like that. That's a lot of fun. Link to comment Share on other sites More sharing options...
death pax Posted February 27, 2006 Author Share Posted February 27, 2006 try messing with Shake Amount ^.^ its amusing to say the least Link to comment Share on other sites More sharing options...
greenmachine Posted February 27, 2006 Share Posted February 27, 2006 try messing with Shake Amount ^.^ its amusing to say the least I did, and it went flying all over the screen. 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