shanet Posted December 16, 2010 Share Posted December 16, 2010 (edited) Small things entertain small minds: expandcollapse popup#cs -----Small Things entertain Small Minds!----- -----Annoying little script put together by Shane Thompson because he has nothing better to do with his time... pretty sad, eh? -----I thought so two. grr who put that there? By the way, whoever you are, you are using the wrong to/too/two. It should be to. And its only annoying because u didn't know about how that mouse thing worked :P (neither did I, admitted it :D) #ce #include <GUIConstantsEX.au3> Opt("MustDeclareVars", 1) Global $winhandle, $infotext, $percent = 0, $progress, $submit = 2, $direction $winhandle = GUICreate("Small Minds", 300, 100) $infotext = GUICtrlCreateLabel("Overall Program Completion... " & $percent & " percent", 10, 180) $progress = GUICtrlCreateProgress(30, 30, 250) GUISetState() While 1 if $percent < 100 Then $direction = 1 Else $direction = 0 EndIf While $direction GUICtrlDelete($infotext) $percent += 0.05 $infotext = GUICtrlCreateLabel("Overall Program Completion... " & $percent & " percent", 10, 180) GUICtrlSetData($progress, $percent) if $percent >= 100 Then $direction = 0 EndIf if GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit EndIf WEnd While $direction = 0 GUICtrlDelete($infotext) $percent -= 0.05 $infotext = GUICtrlCreateLabel("Overall Program Completion... " & $percent & " percent", 10, 180) GUICtrlSetData($progress, $percent) if $percent <= 0 Then $direction = 1 EndIf if GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit EndIf WEnd if $percent = 100 Then sleep(500) $submit = GUICtrlCreateButton("Exit", 250, 70, 40) EndIf if GUIGetMsg() = $GUI_EVENT_CLOSE or GUIGetMsg() = $submit Then Exit EndIf WEnd shanet --EDIT: A fun little bug I found... If you move the mouse, the progress bar speeds up! PHUN! Edited April 6, 2011 by shanet [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm Link to comment Share on other sites More sharing options...
James Posted December 16, 2010 Share Posted December 16, 2010 My mind hurts.If I let the code run by itself, it's pretty slow. If I move my mouse, it speeds up. What. The. Fuck.There is no Mouse*() functions even there. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
jvanegmond Posted December 16, 2010 Share Posted December 16, 2010 My mind hurts.If I let the code run by itself, it's pretty slow. If I move my mouse, it speeds up. What. The. Fuck.There is no Mouse*() functions even there.I think that's because GUIGetMsg returns a mouse event if you move your mouse and the window is active. If there are no events, GUIGetMsg will wait a very very very short time to see if there are any events coming to the queue, that or it asks the queue to "refresh" itself when there are no messages just to make sure. github.com/jvanegmond Link to comment Share on other sites More sharing options...
shanet Posted December 16, 2010 Author Share Posted December 16, 2010 If I let the code run by itself, it's pretty slow. If I move my mouse, it speeds up.You can speed it up if you want, i guess, I dont think its illegal, is it??? If it is then you better arrest me two coz i set the speeds to begin with so I would be violating the law the most I'm sure you can handle speeding it up.shanet [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm Link to comment Share on other sites More sharing options...
MvGulik Posted December 16, 2010 Share Posted December 16, 2010 If I let the code run by itself, it's pretty slow. If I move my mouse, it speeds up. @general: Just some code that shows this behavior really good. -> #774 (some other somewhat related topic, ) "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
shanet Posted December 16, 2010 Author Share Posted December 16, 2010 Hehe I like this bug, it makes my program all the more retarded and stupid I'm sorry program, I didnt mean it! [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm Link to comment Share on other sites More sharing options...
MvGulik Posted December 16, 2010 Share Posted December 16, 2010 What bug? No bug to be found as far I can see.(#774 was fixed, and the "GUIGetMsg() speedup on mouse movement" part is just a logical side effect of the implemented auto sleep inside GUIGetMsg()) "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
AZJIO Posted December 17, 2010 Share Posted December 17, 2010 shanetTo boil the brainexpandcollapse popupGlobal Const $GUI_RUNDEFMSG = 'GUI_RUNDEFMSG' $Gui = GUICreate("Poll for statistics", 450, 260) $Button=GUICtrlCreateButton('Yes', 66, 110, 88, 30) $ButtonN=GUICtrlCreateButton('No', 266, 110, 88, 30) GUICtrlCreateLabel("Want to get a gift?", 0, 0,450, 44, 0x01+0x0200) GUICtrlSetFont(-1,15) GUISetState () GUIRegisterMsg(0x004E, "WM_NOTIFY") Global $BtnXY = ControlGetPos($Gui, "", $Button) While 1 $msg = GUIGetMsg() Select Case $msg = $Button MsgBox(0, 'Message', 'Ooo!') Case $msg = $ButtonN MsgBox(0, 'Message', "It's very strange.") Case $msg = -3 Exit EndSelect WEnd Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $wParam Local Const $BCN_HOTITEMCHANGE = -1249 Local $tNMBHOTITEM = DllStructCreate("hwnd hWndFrom;int IDFrom;int Code;dword dwFlags", $lParam) Local $nNotifyCode = DllStructGetData($tNMBHOTITEM, "Code") Local $dwFlags = DllStructGetData($tNMBHOTITEM, "dwFlags") Local $nID = DllStructGetData($tNMBHOTITEM, "IDFrom") If $nNotifyCode=$BCN_HOTITEMCHANGE Then If BitAND($dwFlags, 0x10) = 0x10 And $nID = $Button Then $CP = MouseGetPos() $aCur_Info = GUIGetCursorInfo($Gui) If $aCur_Info[1]<$BtnXY[1]+$BtnXY[3]+2 And $aCur_Info[1]>$BtnXY[1]+$BtnXY[3]-17 And $aCur_Info[0]>$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]-$BtnXY[3]) MouseMove($CP[0], $CP[1]-$BtnXY[3]) BlockInput(0) EndIf If $aCur_Info[1]<$BtnXY[1]+$BtnXY[3]+2 And $aCur_Info[1]>$BtnXY[1]+$BtnXY[3]-17 And $aCur_Info[0]<=$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]-$BtnXY[3]) MouseMove($CP[0], $CP[1]-$BtnXY[3]) BlockInput(0) EndIf If $aCur_Info[1]<$BtnXY[1]+17 And $aCur_Info[1]>$BtnXY[1]-2 And $aCur_Info[0]>$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]+$BtnXY[3]) MouseMove($CP[0], $CP[1]+$BtnXY[3]) BlockInput(0) EndIf If $aCur_Info[1]<$BtnXY[1]+17 And $aCur_Info[1]>$BtnXY[1]-2 And $aCur_Info[0]<=$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]+$BtnXY[3]) MouseMove($CP[0], $CP[1]+$BtnXY[3]) BlockInput(0) EndIf EndIf EndIf Return $GUI_RUNDEFMSG EndFunc My other projects or all Link to comment Share on other sites More sharing options...
shanet Posted December 17, 2010 Author Share Posted December 17, 2010 What bug? No bug to be found as far I can see.(#774 was fixed, and the "GUIGetMsg() speedup on mouse movement" part is just a logical side effect of the implemented auto sleep inside GUIGetMsg())There are no bugs. My programs don't have bugs, they just develop random features! (This script is a good example!) [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm Link to comment Share on other sites More sharing options...
shanet Posted December 17, 2010 Author Share Posted December 17, 2010 shanet To boil the brain expandcollapse popupGlobal Const $GUI_RUNDEFMSG = 'GUI_RUNDEFMSG' $Gui = GUICreate("Poll for statistics", 450, 260) $Button=GUICtrlCreateButton('Yes', 66, 110, 88, 30) $ButtonN=GUICtrlCreateButton('No', 266, 110, 88, 30) GUICtrlCreateLabel("Want to get a gift?", 0, 0,450, 44, 0x01+0x0200) GUICtrlSetFont(-1,15) GUISetState () GUIRegisterMsg(0x004E, "WM_NOTIFY") Global $BtnXY = ControlGetPos($Gui, "", $Button) While 1 $msg = GUIGetMsg() Select Case $msg = $Button MsgBox(0, 'Message', 'Ooo!') Case $msg = $ButtonN MsgBox(0, 'Message', "It's very strange.") Case $msg = -3 Exit EndSelect WEnd Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $wParam Local Const $BCN_HOTITEMCHANGE = -1249 Local $tNMBHOTITEM = DllStructCreate("hwnd hWndFrom;int IDFrom;int Code;dword dwFlags", $lParam) Local $nNotifyCode = DllStructGetData($tNMBHOTITEM, "Code") Local $dwFlags = DllStructGetData($tNMBHOTITEM, "dwFlags") Local $nID = DllStructGetData($tNMBHOTITEM, "IDFrom") If $nNotifyCode=$BCN_HOTITEMCHANGE Then If BitAND($dwFlags, 0x10) = 0x10 And $nID = $Button Then $CP = MouseGetPos() $aCur_Info = GUIGetCursorInfo($Gui) If $aCur_Info[1]<$BtnXY[1]+$BtnXY[3]+2 And $aCur_Info[1]>$BtnXY[1]+$BtnXY[3]-17 And $aCur_Info[0]>$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]-$BtnXY[3]) MouseMove($CP[0], $CP[1]-$BtnXY[3]) BlockInput(0) EndIf If $aCur_Info[1]<$BtnXY[1]+$BtnXY[3]+2 And $aCur_Info[1]>$BtnXY[1]+$BtnXY[3]-17 And $aCur_Info[0]<=$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]-$BtnXY[3]) MouseMove($CP[0], $CP[1]-$BtnXY[3]) BlockInput(0) EndIf If $aCur_Info[1]<$BtnXY[1]+17 And $aCur_Info[1]>$BtnXY[1]-2 And $aCur_Info[0]>$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]+$BtnXY[3]) MouseMove($CP[0], $CP[1]+$BtnXY[3]) BlockInput(0) EndIf If $aCur_Info[1]<$BtnXY[1]+17 And $aCur_Info[1]>$BtnXY[1]-2 And $aCur_Info[0]<=$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]+$BtnXY[3]) MouseMove($CP[0], $CP[1]+$BtnXY[3]) BlockInput(0) EndIf EndIf EndIf Return $GUI_RUNDEFMSG EndFunc That's pretty cool, are you meant to be able to press the button though? Well if you arent, I did, and also maybe we could have a macro to click it anyway if u cant and u still cant () [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm Link to comment Share on other sites More sharing options...
Ace08 Posted December 21, 2010 Share Posted December 21, 2010 (edited) shanet To boil the brain expandcollapse popupGlobal Const $GUI_RUNDEFMSG = 'GUI_RUNDEFMSG' $Gui = GUICreate("Poll for statistics", 450, 260) $Button=GUICtrlCreateButton('Yes', 66, 110, 88, 30) $ButtonN=GUICtrlCreateButton('No', 266, 110, 88, 30) GUICtrlCreateLabel("Want to get a gift?", 0, 0,450, 44, 0x01+0x0200) GUICtrlSetFont(-1,15) GUISetState () GUIRegisterMsg(0x004E, "WM_NOTIFY") Global $BtnXY = ControlGetPos($Gui, "", $Button) While 1 $msg = GUIGetMsg() Select Case $msg = $Button MsgBox(0, 'Message', 'Ooo!') Case $msg = $ButtonN MsgBox(0, 'Message', "It's very strange.") Case $msg = -3 Exit EndSelect WEnd Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $wParam Local Const $BCN_HOTITEMCHANGE = -1249 Local $tNMBHOTITEM = DllStructCreate("hwnd hWndFrom;int IDFrom;int Code;dword dwFlags", $lParam) Local $nNotifyCode = DllStructGetData($tNMBHOTITEM, "Code") Local $dwFlags = DllStructGetData($tNMBHOTITEM, "dwFlags") Local $nID = DllStructGetData($tNMBHOTITEM, "IDFrom") If $nNotifyCode=$BCN_HOTITEMCHANGE Then If BitAND($dwFlags, 0x10) = 0x10 And $nID = $Button Then $CP = MouseGetPos() $aCur_Info = GUIGetCursorInfo($Gui) If $aCur_Info[1]<$BtnXY[1]+$BtnXY[3]+2 And $aCur_Info[1]>$BtnXY[1]+$BtnXY[3]-17 And $aCur_Info[0]>$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]-$BtnXY[3]) MouseMove($CP[0], $CP[1]-$BtnXY[3]) BlockInput(0) EndIf If $aCur_Info[1]<$BtnXY[1]+$BtnXY[3]+2 And $aCur_Info[1]>$BtnXY[1]+$BtnXY[3]-17 And $aCur_Info[0]<=$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]-$BtnXY[3]) MouseMove($CP[0], $CP[1]-$BtnXY[3]) BlockInput(0) EndIf If $aCur_Info[1]<$BtnXY[1]+17 And $aCur_Info[1]>$BtnXY[1]-2 And $aCur_Info[0]>$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]+$BtnXY[2]-$aCur_Info[0], $CP[1]+$BtnXY[3]) MouseMove($CP[0], $CP[1]+$BtnXY[3]) BlockInput(0) EndIf If $aCur_Info[1]<$BtnXY[1]+17 And $aCur_Info[1]>$BtnXY[1]-2 And $aCur_Info[0]<=$BtnXY[0]+$BtnXY[2]/2 Then BlockInput(1) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]) MouseMove($CP[0]+$BtnXY[0]-$aCur_Info[0], $CP[1]+$BtnXY[3]) MouseMove($CP[0], $CP[1]+$BtnXY[3]) BlockInput(0) EndIf EndIf EndIf Return $GUI_RUNDEFMSG EndFunc nice! wanna get a gift press Tab @shanet wow would you mind if i use this? just wanna know how this works Edited December 21, 2010 by Ace08 Work smarter not harder.My First Posted Script: DataBase Link to comment Share on other sites More sharing options...
shanet Posted December 21, 2010 Author Share Posted December 21, 2010 nice! wanna get a gift press Tab @shanet wow would you mind if i use this? just wanna know how this worksAce08, This is not my script, this is AZJIO's script, but everything posted here is Open Source (you can take the code and compile it, and if you edit it you can claim your edits, with credits to the original author), unless otherwise specified.So, yes.shanet [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm 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