Jump to content

Move mouse from coordinates.


Fuzy
 Share

Recommended Posts

#include<img/img.au3>
#include <AutoItConstants.au3>

Func Skype()
$coords = imageSearch(0,0,-1,-1,"Skype.PNG")
MouseMove($coords[0],$coords[1])

[when it find the skype icon i want it to move from these coordinates, but of insted of moving to an expecific coordinate i want it to move down from these coordinates, (there is multiple images so i cant move to an specific image)] -- Kinda having trouble telling what i want cuz english isnt my first language, sorry about that. ;X
MouseClick($MOUSE_CLICK_LEFT)

Link to comment
Share on other sites

I kinda solved this already by modifying my desired folder icon so it just directly opens it, but im kinda curious on how can i actually move my mouse to an (ammount) of units down or up and left or right.

Link to comment
Share on other sites

K, found it!!! 

i just added this to the code

Func Skype()
$coords = imageSearch(0,0,-1,-1,"Skype.PNG")
MouseMove($coords[0],$coords[1])
    $OriginalX = MouseGetPos(0)
    $OriginalY = MouseGetPos(1)
    $MoveX = 50
    $MoveY = 200
MouseMove($OriginalX + $MoveX, $OriginalY + $MoveY, 5)

MouseClick($MOUSE_CLICK_LEFT)

Link to comment
Share on other sites

  • Moderators

@Fuzy Please pay attention to where you post in the future. Not sure how the Examples forum could be any clearer:

Quote

Do not post general support questions here, instead use the AutoIt Help and Support forums.

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

×
×
  • Create New...