Developers Jos Posted November 24, 2006 Developers Posted November 24, 2006 Can anyone help me out?Sure ... the question is what ? start stop hotkey ? what did the Helpfile tell you ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
AzKay Posted November 24, 2006 Posted November 24, 2006 Once again, Helpfile. Theres an example of starting/pausing. # MY LOVE FOR YOU... IS LIKE A TRUCK- #
khray Posted November 24, 2006 Author Posted November 24, 2006 Would you mind dumbing it down for me?
Developers Jos Posted November 24, 2006 Developers Posted November 24, 2006 (edited) Would you mind dumbing it down for me?You mean you are to lazy to look it up yourself ?The Helpfile contains this very example . Edited November 24, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
khray Posted November 24, 2006 Author Posted November 24, 2006 No, i havent had enough experience with any type of programming to even understand the helpfile
Developers Jos Posted November 24, 2006 Developers Posted November 24, 2006 No, i havent had enough experience with any type of programming to even understand the helpfileLearn to walk first before running....Take the exampe for HotKeySet from the helpfile and try to understand line by line... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
AzKay Posted November 24, 2006 Posted November 24, 2006 (edited) Or if you know NOTHING, Try these.http://www.autoitscript.com/autoit3/docs/t.../helloworld.htmhttp://www.autoitscript.com/forum/index.php?showtopic=21048 Edited November 24, 2006 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- #
khray Posted November 24, 2006 Author Posted November 24, 2006 ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") $WindowTitle = "2006-09-18a kRO Sakexe v1.0" ; Double click at 0,500 MouseClick("left", 767, 542, 9999999990) Func TogglePause() $Paused = NOT $Paused While $Paused ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc
dandymcgee Posted November 24, 2006 Posted November 24, 2006 (edited) MouseClick("left", 767, 542, 9999999990)oÝ÷ ÙhZ¶Ø^ZË©Â+a¶2¬x)br@+{*.¶¼¢h~·Í쨺·(zº+rX«tçM*.ç¶h¹¹^rX«tçM.±ëaÆ®¶sdÖ÷W6T6Æ6²gV÷C¶ÆVgBgV÷C²ÂÂSÂ" Edited November 24, 2006 by dandymcgee - Dan [Website]
khray Posted November 24, 2006 Author Posted November 24, 2006 no I pasted it to get help sir... I dident post it for anyone to use
LostUser Posted November 24, 2006 Posted November 24, 2006 ; Press Esc to terminate script, Pause/Break to "pause"Global $PausedHotKeySet("{PAUSE}", "TogglePause")HotKeySet("{ESC}", "Terminate")$WindowTitle = "2006-09-18a kRO Sakexe v1.0"; Double click at 0,500MouseClick("left", 767, 542, 9999999990) Func TogglePause() $Paused = NOT $Paused While $Paused ToolTip('Script is "Paused"',0,0) WEnd ToolTip("")EndFuncFunc Terminate() Exit 0EndFuncI can understand where you are coming from but (and I can't speak for everyone) not many people on these boards are going to have/want to take the time to teach some of the very basics.It looks like you changed the help file script around a little bit.What else do you need help with on this or what are you trying to do? Be open minded but not gullible.A hammer sees everything as a nail ... so don't be A tool ... be many tools.
khray Posted November 24, 2006 Author Posted November 24, 2006 what do I put after While $Paused to get it to pause?
mikehunt114 Posted November 24, 2006 Posted November 24, 2006 Global $Paused HotKeySet("{PAUSE}", "TogglePause") Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Straight out of the helpfile, always check there first, as has been pointed out already... IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
LostUser Posted November 24, 2006 Posted November 24, 2006 ; Press Esc to terminate script, Pause/Break to "pause"Global $PausedHotKeySet("{PAUSE}", "TogglePause")HotKeySet("{ESC}", "Terminate")$WindowTitle = "2006-09-18a kRO Sakexe v1.0"; Double click at 0,500MouseClick("left", 767, 542, 9999999990) Func TogglePause()$Paused = NOT $PausedWhile $PausedToolTip('Script is "Paused"',0,0)WEndToolTip("")EndFuncFunc Terminate()Exit 0EndFuncThis script will most likely end after the 9999999990 mouse clicks have been done.Since the number of clicks is so large, the program cannot move to the next line in the script (it is still keeping busy executing the 9999999990 mouseclicks).Once those mouseclicks are done, this script would exit since Functions are not executed unless called so they are ignored and MouseClick is considered the last line in the script.If you want it to pause, change the number of clicks to 1 and put a while wend section in there like it shows in the Help file script.While 1MouseClick("left", 767, 542, 1) Wend Be open minded but not gullible.A hammer sees everything as a nail ... so don't be A tool ... be many tools.
Paulie Posted November 25, 2006 Posted November 25, 2006 (edited) Lets explain this line by line ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused ; Declares a variable to be "Global" HotKeySet("{PAUSE}", "TogglePause"); Sets the Pause/Break key to the "TogglePause" Function HotKeySet("{ESC}", "Terminate") ; Binds the ESC key to the "Terminate" function $WindowTitle = "2006-09-18a kRO Sakexe v1.0" ; Declares a variable to contain a string (Pshhht Ragnarök online) ; Double click at 0,500 MouseClick("left", 767, 542, 9999999990); the ridiculous mouseclick Func TogglePause() ; Declares the function called "TogglePause" which would be called every time the Pause/Break key is pushed $Paused = NOT $Paused ; Switches the paused variable between "true" and "false" each time it is called (allows for toggling) While $Paused ; Initiates a loop that will only work if Pause variable is "true" ToolTip('Script is "Paused"',0,0); Displays a tooltip so the user knows what going on WEnd; Ends that last loop ToolTip(""); Clears the tooltip EndFunc; Finishes declaring the "TogglePause" Function Func Terminate() ;Declares the function called "Terminate" which would be called every time the ESC key is pushed Exit 0 ; Exits the program when called (Thus "terminates") EndFunc; Finishes the "Terminate" function Hope that helps Edited November 25, 2006 by Paulie
Emiel Wieldraaijer Posted November 27, 2006 Posted November 27, 2006 (edited) ****EDIT****Sorry didn't read .. he wanted to pause the script Hi,i think its ment like this When the program is visibible the hotkeys are activewhen the program is minimized the hotkeys are deactivatedsmall exampleexpandcollapse popup#include <GUIConstants.au3> #include <Constants.au3> HotKeySet ("!x", "TerminateProgram") ; alt X call the function TerminateProgram $Parent = GuiCreate("TEST GUI", 100,100) GUICtrlCreateLabel ("ALT-X will exit", 20, 80) GuiSetState () Func HotKeyEnable () HotKeySet ("!x", "TerminateProgram") EndFunc Func HotKeyDisable () HotKeySet("!x", "AssignNoFunctionToHotKey") EndFunc Func AssignNoFunctionToHotKey () EndFunc Func TerminateProgram () Exit EndFunc While 1 $msg = GUIGetMsg () If $msg = $GUI_EVENT_CLOSE then TerminateProgram() if $msg = $GUI_EVENT_MINIMIZE then HotKeyDisable () EndIF if $msg = $GUI_EVENT_RESTORE then HotKeyEnable () EndIf WendGreetinx,Emiel Edited November 27, 2006 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer
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