Macro

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Post Reply
Mati93
New User
Posts: 2
Joined: Mon Oct 31, 2022 7:08 pm

Macro

Post by Mati93 »

Hi,
How to program a mouse button simulation so that when a particular button is clicked, it will save the cursor position, then from that saved position it will direct the cursor to the right about (1cm) and about (10cm) down.
I tried the command:
{MSAVE}{MSET:1072,573}{WAITMS:10}{MSAVE}{MSET:1048,859}{WAITMS:10}{LMB}
but unfortunately it doesn't work. It is very important that the macro always directs the mouse cursor from the starting position ( saved) because it can be a different place on the screen each time.
My screen resolution is: 1920x1080

Thank you in advance for your help
Mati93
Last edited by Mati93 on Tue Nov 01, 2022 11:17 pm, edited 1 time in total.
User avatar
Dolmatov
Committed
Posts: 149
Joined: Tue Sep 19, 2017 9:19 pm

Re: Macro

Post by Dolmatov »

Wrong {MSAVE}.
{MSAVE:n} Save the current cursor position to memory <n> (1-10)
{MREST:n} Restore the saved cursor position from memory <n> (1-10)
{MSAVE:1}...{MREST:1}
___
{MADD:x,y} Move cursor X & Y position by <x,y> pixels
right about (1cm) and about (10cm) down.
Try to move in pixels after restoring the position, without specifying the exact coordinates. At the bottom of the command input window (below the help window) is the cursor position.
___
https://highrez.co.uk/downloads/xmousebuttoncontrol.htm
For more information about using and configuring X-Mouse Button Control, please check out the new user guide (mirror).
Mati93
New User
Posts: 2
Joined: Mon Oct 31, 2022 7:08 pm

Re: Macro

Post by Mati93 »

Hi,
I tried such a command ( if I understood correctly what is meant):
{MSAVE:1}{MREST:1}{MADD:1035,486}{WAITMS:10}{MSAVE:2}{MREST:2}{MADD:1039,687}{WAITMS:10}{LMB}
unfortunately it still doesn't work. I don't quite understand how I'm supposed to move in pixels from your answer "Try to move in pixels after restoring the position, without specifying the exact coordinates. At the bottom of the command input window (below the help window) is the cursor position." The example coordinates I'm interested in after placing the cursor in a specific location are, for example:
1035,486 and 1039,687. Please explain to me how to move this in my command so that it works.

Thank you in advance
Mati93
User avatar
Dolmatov
Committed
Posts: 149
Joined: Tue Sep 19, 2017 9:19 pm

Re: Macro

Post by Dolmatov »

MADD - this is a manually calculated offset.
For example, the screen angle is 0 0 (xy). Accordingly, "10,10" will shift along the axes by this number of pixels from this corner.
If the starting position is different and you need to move away from it, then you need to shift the position.

If the destination is always the same (a button in one place on the screen), then it makes sense to use another command with full coordinates.
{MSAVE:1}{MREST:1}
Saved, restored. What for? Does your mouse cursor move in milliseconds?

Test each team separately if you don't know the English words in the team names. If you do not understand the text in the help and in the program window.
Examples:
{MADD:1035,486} - Do just this one click command (no looping) and see the result.
{MSAVE:1}{WAITMS:10000}{MREST:1} - place the cursor on the screen and press the button, while waiting, move the cursor and wait without touching the mouse.
User avatar
Dolmatov
Committed
Posts: 149
Joined: Tue Sep 19, 2017 9:19 pm

Re: Macro

Post by Dolmatov »

Before writing a command, take a notepad and think about the desired algorithm in words.

Example:
1. Mouse cursor in the upper right corner;
2. I move the mouse cursor to the button A;
3. I press the left mouse button;
4. Button A moves one centimeter below the mouse cursor;
5. I move the mouse one centimeter lower;
6. Button A goes back;
7. I return the mouse back.

1. Not used
2. Moving (set) here = MSET
3. Click = LMB
4. Waiting for the button to move = wait/waitms
5. Move the cursor below the current position (not from the starting position or screen corner), i.e. add to current coordinates = madd
6. Waiting for the button to move = wait/waitms
7. Here we see that we can either remember the coordinates from the second step (MSAVE) or set them in different ways. If the coordinates of the button have shifted and you manually moved it, then it is logical to SAVE, and at the last step, RESTORE.
Post Reply