Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

New to AutoIT - Can't Get a Simple MouseClick working...

$
0
0
I'm trying to program a simple program for self use in Magic Online. I followed a few simple tutorials to get accustomed to the syntax (used to C++) and I've hit a bit of a brick wall with the simplest of functions. I cannot seem to get the program to click anywhere on the game window. I don't get any errors or anything, it just doesn't do anything. (Seemingly)

I'm using a GUI button to call this incredibly simple function:

[ autoit ]      
Func GoToCollection() MouseClick("Left",240,1021, 2) EndFunc

My GUI code:
[ autoit ]         
GUICreate("Test Window",500,500) GUISetState(@SW_SHOW) $startbutton = GUICtrlCreateButton("Start", 8, 8, 60) While 1 $msg = GUIGetMsg() Select Case $msg = $startbutton WinActivate("Magic Online", "") Sleep(1000) Call(GoToCollection()) Case $msg = $GUI_EVENT_CLOSE GUIDelete() ExitLoop EndSelect WEnd

Obviously, I've double and triple decked that the mouse coordinates are correct before posting, so it's not something as silly as that, but I imagine it's something rather simple that I'm overlooking, but I can't seem to figure it out via Google searches. The window switch works, but then nothing happens. I've tried it without the function call and just doing it in the switch, I've tried clicking a lot of different buttons but none of them will click. Any idea what I'm overlooking here?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>