Stormsedge75 Posted March 31, 2004 Posted March 31, 2004 Ok I have been trying to write a script but for some reason it ignores all of the Sleep commands and just runs intself right through without stopping. Also I cant get it to hit {ALT} and {1} on the upper left hand corner at the same time, it has to be the number 1 by the letters. I understand how to get text into the screen and get it to press a button but other than that, I cant get it to loop or wait long enough. Basically I need it to look like this. Sleep for 40 seconds. I need it to hit ALT and 1 at the same time. Sleep 20 Seconds. Then I need it to run the ALT-1 and sleep for 20 about 10 times or more. Then I need it to say /heal and press enter (I know how to do this). Sleep 2 minutes /heal again and press enter Then I need it to just run the whole program over again without stopping. I tried making the script from an old one i had but i cant get it to work. Thanks for any help
ezzetabi Posted April 1, 2004 Posted April 1, 2004 Strange, can you post your code? So we can look at it?
Developers Jos Posted April 1, 2004 Developers Posted April 1, 2004 did you use: Sleep, 40orSleep, 40000 ??????? And.... when you want to send ALT+1 you code it like "!1" not "{ALT}1" 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.
Stormsedge75 Posted April 1, 2004 Author Posted April 1, 2004 Here is my code so far.enhance()Func enhance()AutoItSetOption("SendKeyDelay", 25)Sleep (30000)AutoItSetOption("SendKeyDelay", 25)Send ("{ALT}{1}")Sleep (25000)Send ("/heal {ENTER}")Sleep (50000)Send ("/heal {ENTER}")EndFuncI took C++ in highschool but that was a very long time ago lol. I know I know... very poor script but I'm trying hehe.
Stormsedge75 Posted April 1, 2004 Author Posted April 1, 2004 I edited it a little bit to try and fix what you guys showed me, I still cant remember how to write a non ending loop :/ I used the function command b/c it was the only way i could figure out how to get it to work at the moment.enhance()Func enhance()AutoItSetOption("SendKeyDelay", 25)Sleep, (30000)AutoItSetOption("SendKeyDelay", 25)Send ("{ALT}!1")Sleep, (25000)Send ("/heal {ENTER}")Sleep, (50000)Send ("/heal {ENTER}")EndFunc
Developers Jos Posted April 1, 2004 Developers Posted April 1, 2004 Removed the {alt} because "!1" already sends ALT+1 and a While 1...Wend never ending loop. You also had a comma behind the sleep commands but thats V2 syntax. So heres the modified version: AutoItSetOption("SendKeyDelay", 25) While 1 enhance() Wend Func enhance() Sleep(30000) Send("!1") Sleep(25000) Send("/heal {ENTER}") Sleep(50000) Send("/heal {ENTER}") EndFunc 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.
Stormsedge75 Posted April 2, 2004 Author Posted April 2, 2004 Thank you ^^; I'll test it out later tonight.
Stormsedge75 Posted April 2, 2004 Author Posted April 2, 2004 (edited) :/ Its still not hitting alt and 1 at the same time. The way the macros work in the game you have to hold down alt then press a number to run them, ALT 1 is my macro for what I want to use. Is there a command to hold ALT down then press a number while its held down and release it? Edited April 2, 2004 by Stormsedge75
Developers Jos Posted April 2, 2004 Developers Posted April 2, 2004 You could try "{ALTDOWN}1{ALTUP}" 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.
Stormsedge75 Posted April 4, 2004 Author Posted April 4, 2004 Another quesiton. If I want to write a script that recognizes text, Like when someone says something it will play a macro. Can and how do I do that. Basically I want to make it so that if my partner says >>Bob: Heal me. I'll play a macro and cure him. I know how to play my macros now thanks to your help ^^; but I dont know if or how I can do this part.
Developers Jos Posted April 4, 2004 Developers Posted April 4, 2004 Basically I want to make it so that if my partner says >>Bob: Heal me. I'll play a macro and cure him. Don't know what "Games" you play... but i guess I don't want to know ..... Can you read any of it with AU3_Spy.exe ? 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.
Stormsedge75 Posted April 5, 2004 Author Posted April 5, 2004 lol ^^ The game is fullscreen and when you try to minimize it, it closes :/ unless theres a way to pause the spy thing. when you recieve text from someone it would say. >>Bob: text here >>(Name of person):_TexT
Recommended Posts