Jump to content

Recommended Posts

Posted

Hey all!

Im utterly new to this, and after following the tutorials that came with AutoIt, Ive learned a little, but there is of course alot more I dont know how to do. I searched around the forums and found a couple of threads, wich brought me a little further. Then searched a little more on how to make different "sleep" in same function, but I dont know how to implent it like I want to.

Script so far is:

HotKeySet("{ESC}", "quit")
HotKeySet("{Insert}", "Click")

While 1
WinActivate("Anarchy Online")
WinWaitActive("Anarchy Online")
WEnd

Func Click()
While 1
send("1")
Sleep("7000"
Send("1")
Sleep("250")
Send("1")
Sleep("250")
Send("1")
Sleep("250")
Send("1")
Sleep("250")
Send("1")
sleep("250")
Wend
EndFunc

Func quit()
    Exit
EndFunc

The idea is very simple, clicking a certain key ever 7.5 seconds. The problem is that I play a bug and lag ridden game, that would need some margin to actually execute the command in due time. Thats why Ive added the "spam" before and after the time it in theory should hit the key. But to avoid a constant spam, with the following error spam (ingame), there is one bigger delay. How can this be done, without getting the offset delay the current code will give? I would also like to learn have to temp stop the script with a button, without the exit solution I have atm...

I know I probably dont make much sense, and that I should be able to do this very basic stuff no matter how new Im to it, but at least Im a good cook...

All help will be appreciated!

Posted

Thanks for your reply, the pause funtion was just what I was looking for.

But I see I failed to explain what Im trying to achieve with those delays.

I want the script to hit a certain button every 7.5 seconds. To be sure it hit the button at the right time, I also want it to repeatedly hit it in +/- 1 second of that recharge time. I hope that was a little clearer.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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