Jump to content
Sign in to follow this  
ezzetabi

Set Hotkey With Mouseclick?

Recommended Posts

ezzetabi

It may sound silly, but I am tring to make a small program that let play keyboard only games with the mouse.

I made the check in order to understand what of the eight direction the mouse moves and send the proper command (taken from a .ini file) but as last thing I'd like convert mouse click in keys in order to send keys when I click.

Is that somewhat possibile?

Thanks!

Overall thanks to you Jon for this great program... :whistle:

Share this post


Link to post
Share on other sites
scriptkitty

I would use the mouse like a joystick actually:

Tooltip("center",400,400)
while 1
$pos=MouseGetPos()
if $pos[0]<200 then send("{left}")
if $pos[0]>600 then send("{right}")
if $pos[1]<200 then send("{up}")
if $pos[1]>600 then send("{down}")
sleep(10)
wend

You can adjust sleep times acording to your game, and you might want to use "x" instead of "center"

As far as mouse presses, the new beta has mousewheel functions.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites
ezzetabi

Nice (and far easier than my script) but it does not solve my problem...

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  

×