Jump to content
Sign in to follow this  

Set Hotkey With Mouseclick?

Recommended Posts

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?


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

Share this post

Link to post
Share on other sites

I would use the mouse like a joystick actually:

while 1
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}")

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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...