ZanaxNL Posted August 26, 2010 Share Posted August 26, 2010 Hey.I need to do 2 function on the {Home} Keywhen i doHotKeySet("{Home}", "TogglePause")HotKeySet("{Home}", "Trial")it dont work.Fix please : DThxZanaxNL Link to comment Share on other sites More sharing options...
JohnOne Posted August 26, 2010 Share Posted August 26, 2010 You cannot, its pointless too. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ZanaxNL Posted August 26, 2010 Author Share Posted August 26, 2010 Ok, but i have on that [home] key a sending key script. but i want that he automatic close in 30minutes. but than will the sending keys stops by the line. sleep(1800000) so he will only wait.. how to fix that ? Link to comment Share on other sites More sharing options...
ZanaxNL Posted August 26, 2010 Author Share Posted August 26, 2010 With the HOME key he will start the progress (Sending keystrokes) And when the HOME key is pressed then there most be a timer that says Over 30minutes > Exit Help me : ( Link to comment Share on other sites More sharing options...
kaotkbliss Posted August 26, 2010 Share Posted August 26, 2010 Use TimerInit() and TimerDiff() to keep track of how much time has passed without pausing the script. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
ZanaxNL Posted August 26, 2010 Author Share Posted August 26, 2010 Func TogglePause() $UnPaused = NOT $UnPaused While $UnPaused ToolTip("Bot Active",0,0) If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{TAB}"),0) Sleep (500) If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F12}"),0) If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F1}"),0) Sleep (1000) If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F12}"),0) Sleep (500) WEnd EndFuncI want that when TogglePause, ((HOME) key) is pressed/run than after 30minutes he will shutdown automaticly. when i write down Sleep (1800000) he wil stop also sending those controlsends. Please Fix this : ( !!THANKSZanaxNL Link to comment Share on other sites More sharing options...
JohnOne Posted August 26, 2010 Share Posted August 26, 2010 Use TimerInit() and TimerDiff() to keep track of how much time has passed without pausing the script. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ZanaxNL Posted August 26, 2010 Author Share Posted August 26, 2010 It only count how long it takes... can u fix it in the scirpt what i post in my last post. I dont understand what u mean... Sorry, ZanaxNL Link to comment Share on other sites More sharing options...
kaotkbliss Posted August 26, 2010 Share Posted August 26, 2010 "ToolTip("Bot Active",0,0)" I'm done. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
ZanaxNL Posted August 26, 2010 Author Share Posted August 26, 2010 OMG? u can better what to fill in. not giv some script codes. Just tell what to do. timerinit just count how much 1 loop cost in time. i want that that over 30minutes the looping stopt and > exit Link to comment Share on other sites More sharing options...
JohnOne Posted August 26, 2010 Share Posted August 26, 2010 (edited) something like this perhaps Global $time Func TogglePause() $UnPaused = NOT $UnPaused If $UnPaused Then $time = TimerInit() EndIf If TimerDiff($time) >= (1000 * 60) * 30 Then Exit EndIf While $UnPaused ToolTip("Bot Active",0,0) If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{TAB}"),0) Sleep (500) If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F12}"),0) If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F1}"),0) Sleep (1000) If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then ControlSend ("####", "", "", ("{F12}"),0) Sleep (500) WEnd EndFunc edit: ZOMG !!! Edited August 26, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ZanaxNL Posted August 26, 2010 Author Share Posted August 26, 2010 i think it is close. Now he will close if you press {home} key again. Maybe most it be set in the Whil>Wend part? Help : D Ty Link to comment Share on other sites More sharing options...
AlmarM Posted August 26, 2010 Share Posted August 26, 2010 "ToolTip("Bot Active",0,0)"I'm done. OMG?u can better what to fill in.not giv some script codes.Yup, he's making a BOT. He won't show us the ControlSend title because he knows we're not going to help him that way. Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
ZanaxNL Posted August 26, 2010 Author Share Posted August 26, 2010 (edited) Pfffffff, why do you think that. its about mozzilla. but not evrybody has to know that. Yes its a game. but flash game on game site. Just wanna know how to stop the scirpt in a time Im im new, play with it around a week or someting Edited August 26, 2010 by ZanaxNL Link to comment Share on other sites More sharing options...
AlmarM Posted August 26, 2010 Share Posted August 26, 2010 Ah yes, makes sences. Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
taietel Posted August 26, 2010 Share Posted August 26, 2010 Try this: expandcollapse popup#include <GUIConstantsEx.au3> HotKeySet("{HOME}", "FunctionH") Global $Form1 = GUICreate("Form1", 349, 49, 429, 265) Global $Label1 = GUICtrlCreateLabel("Press HOME...", 16, 16, 324, 17) GUISetState(@SW_SHOW) Global $state = 0 While 1 Sleep(10) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Form1 EndSwitch WEnd Func FunctionH() Switch $state Case 0 TogglePause() $state = 1 Case 1 Trial() $state=0 EndSwitch EndFunc Func TogglePause() GuiCtrlSetData($Label1,"ToglePause is called!") EndFunc Func Trial() GuiCtrlSetData($Label1,"Trial is called!") EndFunc M.I. Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
Tvern Posted August 26, 2010 Share Posted August 26, 2010 Pfffffff, why do you think that.Perhaps because of this post?Yes its a game. but flash game on game site.In that case you could link the game so we can see for ourselves and to clarify what you are trying to achieve. Link to comment Share on other sites More sharing options...
ZanaxNL Posted August 26, 2010 Author Share Posted August 26, 2010 Closed did it other way. Link to comment Share on other sites More sharing options...
taietel Posted August 26, 2010 Share Posted August 26, 2010 ZanaxNL, why don't you post your way? Others can learn from different posted solutions. Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
ZanaxNL Posted August 26, 2010 Author Share Posted August 26, 2010 a other guy on the internet, give me a the edited script. $x = $x+2 if $x = 1800 then exit and than in begin $x=0 . Closed 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