hmRaggy Posted June 18, 2007 Share Posted June 18, 2007 HotKeySet("z", "one") ;;;;;;;;;; Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{f1}", "Terminate") Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc ;;;;;;;;;; While 1 dim $1 WEnd Func one() $1 = $1+1 Send("{"&$1&"}") Send("{ENTER}", 0) EndFunc Theres my script. I'm trying to get it to go from 1 and every time I punch my key I want it to go up one more number like this " 1 2 3 4 5 6 7 8 9 10 11 12 " But it only goes to 9 then puts in 1 10x times then 2 10x times like this... " 1 2 3 4 5 6 7 8 9 1 1 1 1 1 " how do I get it to type in 10, 12, 13, and so on?? Link to comment Share on other sites More sharing options...
SpookMeister Posted June 18, 2007 Share Posted June 18, 2007 Change the send line to Send($1) [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
hmRaggy Posted June 18, 2007 Author Share Posted June 18, 2007 Change the send line to Send($1)OMFG I LOVE YOU! Link to comment Share on other sites More sharing options...
SpookMeister Posted June 18, 2007 Share Posted June 18, 2007 (edited) OMFG I LOVE YOU!Say it with Flowers... or high quality computer parts http://www.newegg.com I also took a sec to clean up the code a tad... mostly just the way it is organized. You will find that if you keep this kind of structure consistent when coding, it really helps (days or months later) when you have to figure out what the hell you were trying to do when you wrote it. It's a good habit to have. HotKeySet("z", "one") HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{f1}", "Terminate") Global $Paused Dim $1 While 1 Sleep(100) WEnd Func one() $1 = $1 + 1 Send($1) Send("{ENTER}", 0) EndFunc ;==>one Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate Edited June 18, 2007 by SpookMeister [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] 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