midgetmofia124 Posted September 25, 2006 Share Posted September 25, 2006 Hey im trying to make a script for a game HotKeySet("{INSERT}", "fly") HotKeySet("{DELETE}", "term") Func fly() send("w") Sleep(100) Send("w") MouseClick("left") Send ("{SPACE}") EndFunc Func term() Exit EndFunc what i want it to do is when i press insert it send those keys to the game... i think i did it right but im not sure Link to comment Share on other sites More sharing options...
cppman Posted September 25, 2006 Share Posted September 25, 2006 (edited) yeah you did it right.. but you might want to add a loop to keep it open: HotKeySet("{INSERT}", "fly") HotKeySet("{DELETE}", "term") Func fly() send("w") Sleep(100) Send("w") MouseClick("left") Send ("{SPACE}") EndFunc Func term() Exit EndFunc while 1 sleep(100) wend Edited September 25, 2006 by CHRIS95219 Miva OS Project Link to comment Share on other sites More sharing options...
midgetmofia124 Posted September 25, 2006 Author Share Posted September 25, 2006 i tryed it earlier what loop would i use. i tryed the Do > Until but i couldnt get it to work $sleep = 1 do Sleep(60000) $sleep = $sleep + 1 Until $sleep = 1000000 i dont think i would use the sleep in there.... cuase it puases the scrpit but i dont know what command to use. wish autoit had an idle commmande feature Link to comment Share on other sites More sharing options...
midgetmofia124 Posted September 25, 2006 Author Share Posted September 25, 2006 bump... Link to comment Share on other sites More sharing options...
cppman Posted September 25, 2006 Share Posted September 25, 2006 lol, i just showed you in my example. While/Wend While 1 ;Do something here Wend Miva OS Project Link to comment Share on other sites More sharing options...
midgetmofia124 Posted September 25, 2006 Author Share Posted September 25, 2006 okay... but what im asking is what do i put in the loop a sleep, or what Link to comment Share on other sites More sharing options...
cppman Posted September 25, 2006 Share Posted September 25, 2006 for now, just a: sleep Miva OS Project Link to comment Share on other sites More sharing options...
theguy0000 Posted September 25, 2006 Share Posted September 25, 2006 you should sleep for about 100 milliseconds inside the loop. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
AceLoc Posted September 25, 2006 Share Posted September 25, 2006 ya so should be like: While 1 Sleep(100) ;whatever you wanna do WEnd Thanks. [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
dabus Posted September 25, 2006 Share Posted September 25, 2006 Please note that you have a good chance that you're game has some issues with send (at least I heard that some time ago )... Link to comment Share on other sites More sharing options...
AceLoc Posted September 25, 2006 Share Posted September 25, 2006 Please note that you have a good chance that you're game has some issues with send (at least I heard that some time ago )...lies. [quote name='AceLoc']I gots new sunglasses there cool.[/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