Help on script

5 posts in this topic

iorgov 0

I'm newbie in autoit scripting and i was wondering can u good ppl give me a hand.

I am playing a game where u must use the right mouse button all the time. the problem is that my right mouse button skips. When i press and hold it it usually clicks a couple of times and it's not very pleasant.

I would really appreciate if someone helps me in writing a scrip where i can swap my right mouse button with some keyboard key (Shift for example), but the keyboard to work as a mouse button, I mean if I keep the shift key pressed the right mouse button responds as it is held down, and when I release the shift, the mouse button releases too.

Thanks in advance!

Share this post

Link to post

Share on other sites

niubbone 0

You will need to do a while loop with _IsPressed and MouseClick, MouseDown and MouseUp in it.

A starting example may be:

#include <Misc.au3>$dll=DllOpen("user32.dll");needed to recognise hex keys, Example: 10 is ShiftWhile1;endless loop until the script is openSelectCase_IsPressed("10",$dll);if shift is pressedMouseClick("Right");then perform a right clickSleep(100);and wait 100 millisecondsEndSelect;add as many cases as u need to simulate right mouse clickWend