Jump to content
Sign in to follow this  

Why doesnt this always work?

Recommended Posts

#include <Misc.au3>
$dll = DllOpen("user32.dll")
While 1
    Sleep ( 250 )
    If _IsPressed("61", $dll) Then
        ControlClick("Zenx Engine v2.09 TEST VERSION", "Zenx Trainer", 66262)
;ControlClick("ZenxEngine - Trainer", "Godmode", 197690)
        ControlCommand("ZenxEngine - Trainer", "Godmode", "TCheckBox11", "check")

It is supposed to bring up a window, then check a box. Sometimes it works, sometimes it doesn't. Most of the time when I press the button nothing happens. When it works, the icon at the bottom of the screen disappears, but usually it doesn't disappear and nothing happens.

But when it does work, and I have the first two ControlClick's without a comment( the ;, I think thats called a comment), it doesn't click for the second one. It's supposed to check a box, and it doesn't.

If I have the first and third ControlClick's without a comment, it doesn't check the box either.

I don't know if that makes sense, but hopfully someone can help.

Edit: now I can get it to always do the first click by holding down 1 for a few seconds, but it never checks the box.

Edited by Zamp

Share this post

Link to post
Share on other sites

I have another problem, whenever I close the program, then reopen it, all the controlID's change. So thats why the second mouseclick wasn't working for me. Is there anyway to have autoit click on something that doesn't use controls?

Share this post

Link to post
Share on other sites

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
Sign in to follow this  

  • Create New...