Hyflex Posted September 10, 2006 Share Posted September 10, 2006 Global $Paused HotKeySet("{HOME}", "Togp") HotKeySet("{END}", "Close") While 1 Sleep(100) WEnd Func Togp() $Paused = NOT $Paused While $Paused >>>HERE NEED HELP<<< WEnd EndFunc Func Close() Exit 0 EndFunc Where it says: ">>>HERE NEED HELP<<<" that is where i want it to do. Press the letter s and then wait 1 sec. But i want it to repeat 500 Times. and i want a little box to be in the top left telling me how many times its done the code i think its ToolTip Can someone help Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 10, 2006 Share Posted September 10, 2006 yes tooltip and check out For in the help file, itll be a For Next Loop Link to comment Share on other sites More sharing options...
Hyflex Posted September 10, 2006 Author Share Posted September 10, 2006 i looked but cant find.... Link to comment Share on other sites More sharing options...
BigDod Posted September 10, 2006 Share Posted September 10, 2006 Global $Paused HotKeySet("{HOME}", "Togp") HotKeySet("{END}", "Close") While 1 Sleep(100) WEnd Func Togp() $Paused = Not $Paused While $Paused For $i = 1 To 500 ToolTip("Run No" & $i) Send("s") Sleep(1000) Next WEnd EndFunc ;==>Togp Func Close() Exit 0 EndFunc ;==>Close Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 10, 2006 Share Posted September 10, 2006 (edited) i looked and found it pretty fast typing in For EDIT: ugh big dod writes it for him, why not let him learn expandcollapse popupFor...Next -------------------------------------------------------------------------------- Loop based on an expression. For <variable> = <start> To <stop> [Step <stepval>] statements ... Next Parameters variable The variable used for the count. start The initial numeric value of the variable. stop The final numeric value of the variable. stepval [optional] The numeric value (possibly fractional) that the count is increased by each loop. Default is 1. Remarks The Variable will be created automatically with a LOCAL scope, even when MustDeclareVars is on. For...Next statements may be nested. The For loop terminates when the value of variable exceeds the stop threshold. If stepVal or stop is a variable, its value is only read the first time the loop executes. A For loop will execute zero times if: start > stop and step > 0, or start < stop and step is negative Related ContinueLoop, ExitLoop For $i = 5 to 1 Step -1 MsgBox(0, "Count down!", $i) Next MsgBox(0,"", "Blast Off!") Edited September 10, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
BigDod Posted September 10, 2006 Share Posted September 10, 2006 If he runs mine it will not work properly for him, I did not fix the pause/unpause part. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Hyflex Posted September 10, 2006 Author Share Posted September 10, 2006 Send doesnt work, i need it to just do a keypress u know wat i mean? And that text doesnt help me. And cos there example and everything confuses me more Can ya explain and do me the actual thing cos me = real confused Link to comment Share on other sites More sharing options...
Hyflex Posted September 11, 2006 Author Share Posted September 11, 2006 bump hehe can someone explain and everything Link to comment Share on other sites More sharing options...
dabus Posted September 11, 2006 Share Posted September 11, 2006 If you want to do some scripting, start "learning" debugging. You think Send is not working - so lets see. Send does simulate a keypress. If you can't see anything happening, open a notepad window, get the given code and see if anything happens. Run ('notepad.exe') Sleep (1000) For $i = 1 To 500 ToolTip("Run No" & $i) Send("s") Sleep(1000) Next I'd bet it works. So get rid of those while-stuff, as bigdog said... Link to comment Share on other sites More sharing options...
Hyflex Posted September 11, 2006 Author Share Posted September 11, 2006 If you want to do some scripting, start "learning" debugging. You think Send is not working - so lets see. Send does simulate a keypress. If you can't see anything happening, open a notepad window, get the given code and see if anything happens. Run ('notepad.exe') Sleep (1000) For $i = 1 To 500 ToolTip("Run No" & $i) Send("s") Sleep(1000) Next I'd bet it works. So get rid of those while-stuff, as bigdog said... It works when typeing but he game is not reconiseing a keypress. 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