Sign in to follow this  
Followers 0
Hakon

Hotkey = Down, then move and click ..

5 posts in this topic

#1 ·  Posted (edited)

Hey..

I'm not that good at AutoIt..but i'm learning slowly :)

I would like to make a script that when the hotkey is pressed it the mouse moves to a point on the screen and click.

Like if ALT and B is pressed the mouse moves to (500,500) and click.

This didn't work, but can i use something like this?

HotKeySet("{alt}{b}", mousemove(500,500)(mouseclick("left"))

I have searched and tryed to find something that would help me..but no luck..

Thanks for all help i get.

Edited by Hakon

Share this post


Link to post
Share on other sites



For the hotkey, unless your doing something special you should use !b

Your close, I don't think that can work, so what I recommend doing is making a function, then binding that to the hotkey:

HotKeySet("!b", "exFunc")

Func exFunc()
    MouseClick("left", 500, 500, 1, 1) ; change speed as needed
EndFunc

Share this post


Link to post
Share on other sites

When i run the script it just exit itself..

Is something wrong?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thank you so much!

It works perfectly now :)

Edited by Hakon

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