Jump to content

Recommended Posts

Posted

Hey guys, i started using AutoIt today to make a macro program for online games and such. I've managed to get one of the two macros working.

I've made an auto rightclicker and that runs and terminates fine.

But when i started over and went to use it to make a macro that holds Left or right ctrl down, it'll start, but won't terminate or pause properly.

It'll run, and i'll hit the pause or terminate key, and it'll say it's paused but i have to physically push the LCTRL key in to get the macro to stop.

Anyways heres the code.

Global $Paused
HotKeySet("{TAB}", "TogglePause")
HotKeySet("{\}", "Terminate")
HotKeySet("+!d", "ShowMessage")  
While 1
Send("{LCTRL down}")
WEnd
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(25,"","")
EndFunc
Posted (edited)

You might want to take a look at this.

Edit: Beat me to it!

Edited by LurchMan

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Posted

Ahh, sorry didnt see that one ;).

However, technically i'm not asking for help to make a game macro, im just confused as to why the command key is 'sticky' so to speak. It doesnt release even tho i've terminated it. :)

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
×
×
  • Create New...