Mouse button 4 and 5.

Hints, tips and tricks for newbies

Moderators: JRL, Dorian (MJT support)

Post Reply
n0033222
Newbie
Posts: 2
Joined: Tue Oct 08, 2013 12:41 pm

Mouse button 4 and 5.

Post by n0033222 » Tue Oct 08, 2013 12:51 pm

Hello everyone!
Macro Scheduler supports the button 4 and 5 of mouse?
I need a macro for a game, but i can't use other buttons except mouse in the game.

My script is:
//NP1
let>x=0
repeat>x
Mclick
wait>2
Press NP1
wait>2
let>x=x+1
Until>x=20
wait>12

//NP2
Press NP2
wait>8

//NP3
let>z=0
repeat>z
Press NP3
wait>2
let>z=z+1
Until>z=20



I want to replace "NPx" keyboard buttons to mouse 4 and 5. But i can't find these commands in mscheduler.

Thanks in advance.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1414
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Tue Oct 08, 2013 11:34 pm

I know a mouse wheel movement can be emulated using Libfunc, so I see no reason why your extra buttons can't be either.

http://www.mjtnet.com/forum/viewtopic.php?t=2659

n0033222
Newbie
Posts: 2
Joined: Tue Oct 08, 2013 12:41 pm

Post by n0033222 » Wed Oct 09, 2013 5:12 pm

Parsnipnose3000 wrote:I know a mouse wheel movement can be emulated using Libfunc, so I see no reason why your extra buttons can't be either.

http://www.mjtnet.com/forum/viewtopic.php?t=2659
Well... thanks for the reply, but i don't understand what you said.
Can you give me the command for emulate the mouse 4 and 5?

I tried to record my clicks to get the code, but MS doesn't recognize they.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Oct 10, 2013 10:23 am

I'd no idea there was such a thing as a mouse with 5 buttons. And there is no mention of any specific key codes for such buttons here:

http://msdn.microsoft.com/en-us/library ... s.85).aspx

Perhaps these are custom buttons which can be defined by your mouse driver software? In which case you can probably configure them to simulate any other existing key. You could then just have Macro Scheduler send whichever key combo they represent.

Or, perhaps they can be configured to send a custom VK code. If you can find out what that is you can have Macro Scheduler send that value using the Keybd_Event function with Libfunc.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1414
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Fri Oct 11, 2013 12:55 am

Mouses, mice, have come a long way. I have a Logitech G700s. It has 13 buttons, almost all of which are programmable. It's supposed to be a gaming mouse, but I use it for work.

It has five profiles, too, which can auto-sense whichever application is in use.

So I assign my Macro Scheduler hot keys to the mouse buttons. Clicking on, for example, one of the four different thumb buttons might press "ctrl alt 5", and then fire up a macro. This is all set from the mouse management software. I have a feeling that most mice with "extra" buttons have some kind of extra drivers?

So I'm automating my automation. :D

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Sat Oct 12, 2013 11:23 am

Mice, have come a long way. I have a Logitech G700s. It has 13 buttons, almost all of which are programmable. It's supposed to be a gaming mouse, but I use it for work.


Yup me too.

I actually have 2 G700S and a G510. Would be lost without them. :)

Image
Phil Pendlebury - Linktree

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Oct 14, 2013 11:22 am

So in other words, these buttons (4 and 5) do not send special mouse event messages, they simulate key presses, they are really virtual keyboards.

So if the OP's question was "how do I have a macro simulate buttons 4 and 5" the answer would be "have the macro simulate the keystrokes that these buttons are assigned to simulate themselves". So e.g. if button 4 is assigned to CTRL+T the code would be:

Press CTRL
Send>t
Release CTRL

That code now does the same as what button 4 on the mouse is currently assigned to do.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

blackgul
Newbie
Posts: 1
Joined: Wed Oct 30, 2013 4:33 am
Location: Pakistan

Post by blackgul » Wed Oct 30, 2013 5:23 am

I assign my Macro Scheduler hot keys to the mouse buttons. Clicking on, for example, one of the four different thumb buttons might press "ctrl alt 5", and then fire up a macro. This is all set from the mouse management software. I have a feeling that most mice with "extra" buttons have some kind of extra drivers?

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Wed Oct 30, 2013 7:12 am

blackgul wrote:I assign my Macro Scheduler hot keys to the mouse buttons. Clicking on, for example, one of the four different thumb buttons might press "ctrl alt 5", and then fire up a macro. This is all set from the mouse management software. I have a feeling that most mice with "extra" buttons have some kind of extra drivers?
Yup exactly.
Phil Pendlebury - Linktree

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts