Sign in to follow this  
Followers 0
Guest Lostcuase

Help Me With Mousemove Please

6 posts in this topic

#1 ·  Posted (edited)

I am trying to use autoit and trying to get this program to run its self. Here is the script and I know very little about programming.

Repeat, 0

Send, {F1}

Sleep, 3000

Send, {Enter}

Sleep, 3000

MouseMove, <x:178>, <y:364>

LeftClick, <x:178>, <y:364>

LeftClick, <x:178>, <y:364>

MouseMove, <x:244>, <y:360>

LeftClick, <x:244>, <y:360>

LeftClick, <x:244>, <y:360>

MouseMove, <x:311>, <y:355>

LeftClick, <x:311>, <y:355>

LeftClick, <x:311>, <y:355>

Sleep, 3000

Send,{enter 2}

Sleep, 3000

Send, {enter 3}

Sleep, 5000

Endrepeat,

Ok now heres what its doing. All of the keystroke commands are working fine. But when it comes to the mousemove the cursour goes up to the right top corner and clicks there. What am I doing wrong or missing.

Am I missing something like the screen size or possibly have to put something in about hieght and width of window or window name???

Does Autoit have an option where you can hit keys or move cursor then autoit repeats your moves???

Edited by Lostcuase

Share this post


Link to post
Share on other sites



Try

MouseMove, 178, 364

Similarly for LeftClick


GrahamS

Share this post


Link to post
Share on other sites

I tried to use the

MouseMove, 178, 364

same thing cursor goes to top right corner of screen and clicks

Share this post


Link to post
Share on other sites

Hmmm

trying to get this program to run its self

What does this mean?

Also - how did you work out the coordinates? The X & Y co-ordinates are relative to the active window


GrahamS

Share this post


Link to post
Share on other sites

I got the co-ords from the autoit revealmode. It says

Window Titel

Window Dimensions

X: Y: Width: Height:

Mouse Co-ords [relative to active window]

X: Y: <-------- I used these co-ords

Trying to get it to double click on 3 icons for me in a program I am running.

Share this post


Link to post
Share on other sites

How about moving up to AutoIt v3? Especially since you posted in the v3 support forum rather than the v2 support forum :whistle:

Your script in v3 is

While 1
  Send({F1})
  Sleep(3000)
  Send({Enter})
  Sleep(3000)
  MouseClick("left", 178, 364, 2)
  MouseClick("left", 244, 360, 2)
  MouseClick("left", 311, 355, 2)
  Sleep(3000)
  Send({enter 2})
  Sleep(3000)
  Send({enter 3})
  Sleep(5000)
EndWhile

GrahamS

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