Sign in to follow this  
Followers 0
Stormsedge75

Help With Script.

13 posts in this topic

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

Share this post


Link to post
Share on other sites



Strange, can you post your code? So we can look at it?

Share this post


Link to post
Share on other sites

did you use:

Sleep, 40
or
Sleep, 40000

???????

And.... when you want to send ALT+1 you code it like "!1" not "{ALT}1"


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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}")

EndFunc

I 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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Thank you ^^; I'll test it out later tonight.

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 by Stormsedge75

Share this post


Link to post
Share on other sites

Thanks~!! It worked! :whistle:

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Basically I want to make it so that if my partner says >>Bob: Heal me.  I'll play a macro and cure him.

:whistle: Don't know what "Games" you play... but i guess I don't want to know ..... B)

Can you read any of it with AU3_Spy.exe ?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0