Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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
Posted

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.
  :)

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
Posted

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
Posted

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 ?

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.
  :)

Posted

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...