pnut Posted October 28, 2006 Share Posted October 28, 2006 Well, I've tried to make a macro in game for me to be AFK with using ControlSend and ControlClick function but it just doesn't work. May any of you dudes rectify my script here thanks: #NoTrayIcon AutoItSetOption("WinTitleMatchMode", 2) WinWaitActive("Archernar") HotKeySet("{F11}", "_exit") Break(0) While 1 ControlClick("Archernar", "", "left") Sleep(200) ControlSend("Archernar","","","!q",0) WEnd Func _exit() Break(1) Exit EndFunc I have to tell you I'm very new to programming and scripting so please don't laugh at a pathetic script like this. I've started doing these just a day ago. Basically, this script continuously click the game and sends the button ALT+Q. I could do it without a controlsend function but I want to do other stuffs while leaving my game alone. Link to comment Share on other sites More sharing options...
sigil Posted October 28, 2006 Share Posted October 28, 2006 ControlClick("Archernar", "", "left") Sleep(200) ControlSend("Archernar","","","!q",0) Controlclick needs the controlID for whatever you're trying to click on. If you just want to simulate a lot of clicks on the mouse, regardless of where the cursor is, use MouseClick, e.g., MouseClick("left") If you want to click something in particular, then to get the controlID, you can use the AutoIt Window Info tool. You'll need to do this to make ControlSend work properly. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now