Sign in to follow this  
Followers 0
Shunobies

Simple Cordinate Mouse Click

2 posts in this topic

For some reason when I check this code it seems that there are no syntax error and it compiles fine. But when I try to run it on my machine it begins to load and then exit's almost immediately. I'm not sure what i'm doing wrong and am very new to using AutoIt. Here's the code.

HotKeySet("{LEFT}", "moveLeft")
Func moveLeft()
    MouseClick("left", 1104, 402, 1, 10)
EndFunc

HotKeySet("{DOWN}", "moveDown")
Func moveDown()
    MouseClick("left", 1146, 447, 1, 10)
EndFunc

HotKeySet("{RIGHT}", "moveRight")
Func moveRight()
    MouseClick("left", 1188, 402, 1, 10)
EndFunc

HotKeySet("{UP}", "moveUp")
Func moveUp()
    MouseClick("left", 1146, 365, 1, 10)
EndFunc

HotKeySet("{NUMPAD9}", "melee")
Func melee()
    MouseClick("left", 1058, 623, 1, 10)
EndFunc

HotKeySet("{NUMPAD1}", "slotOne")
Func slotOne()
    MouseClick("left", 1042, 572, 1, 10)
EndFunc

HotKeySet("{NUMPAD2}", "slotTwo")
Func slotTwo()
    MouseClick("left", 1080, 572, 1, 10)
EndFunc

HotKeySet("{NUMPAD3}", "slotThree")
Func slotThree()
    MouseClick("left", 1122, 572, 1, 10)
EndFunc

HotKeySet("{NUMPAD4}", "slotFour")
Func slotFour()
    MouseClick("left", 1158, 572, 1, 10)
EndFunc

HotKeySet("{NUMPAD5}", "slotFive")
Func slotFive()
    MouseClick("left", 1199, 572, 1, 10)
EndFunc

HotKeySet("{NUMPAD6}", "slotSix")
Func slotSix()
    MouseClick("left", 1237, 572, 1, 10)
EndFunc

Share this post


Link to post
Share on other sites



add this to your code

While 1
    Sleep(100)
WEnd

Because your program just exit immediately ;)

I am so sleeping

Goodnight


This world is crazy

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  
Followers 0