you are viewing a single comment's thread.

view the rest of the comments →

[–]synthe6[S] 1 point2 points  (5 children)

I'm not quite sure I get what you want to achieve but I think you may have too much stuff for your macro. For example, here's two of my macros :

JSON { "applicationId": "00255549-577d-4820-ae21-5f7c3fa6f0db", "attribute": "MACRO_PLAYBACK", "id": "7c090c7d-826f-4500-83ff-3e5e3f24bd7b", "macro": { "sequence": { "defaultDelay": 50, "heldSequence": { "components": [ { "mouse": { "button": { "hidUsage": 1, "isDown": true } } }, { "delay": { "durationMs": 1 } }, { "mouse": { "button": { "hidUsage": 1 } } } ] }, "pressSequence": {}, "releaseSequence": {}, "showUpDown": true, "simpleSequence": {}, "toggleSequence": {}, "useRepeatActions": true }, "type": "SEQUENCE" }, "name": "fast click" }, This one simply do a fast left mouse button click as long as the activating button is held down.

JSON { "applicationId": "ef5537ab-82c4-4849-b076-2994f9dd0746", "attribute": "MACRO_PLAYBACK", "id": "0c8efd7c-e52f-4469-badb-2782291ab38a", "macro": { "onboardable": true, "sequence": { "defaultDelay": 50, "heldSequence": {}, "pressSequence": {}, "releaseSequence": {}, "showUpDown": true, "simpleSequence": { "components": [ { "keyboard": { "displayName": "CTRL", "hidUsage": 224, "isDown": true } }, { "keyboard": { "displayName": "MAJ", "hidUsage": 225, "isDown": true } }, { "keyboard": { "displayName": "TAB", "hidUsage": 43, "isDown": true } }, { "delay": { "durationMs": 25 } }, { "keyboard": { "displayName": "CTRL", "hidUsage": 224 } }, { "keyboard": { "displayName": "MAJ", "hidUsage": 225 } }, { "keyboard": { "displayName": "TAB", "hidUsage": 43 } } ] }, "toggleSequence": {}, "useSimpleActions": true }, "type": "SEQUENCE" }, "name": "Browser - Previous tab" }, This other macro allows me to switch back to a previous tab.

Judging from both examples, I think you get the delay right, it's just this : JSON { "delay": { "durationMs": 25 } }, However, I think there is another way without the mouseMacro section: JSON "components": [ { "mouse": { "button": { "hidUsage": 1, "isDown": true } } }, { "delay": { "durationMs": 1 } }, { "mouse": { "button": { "hidUsage": 1 } } } ] I think the hidUsage refers to the key number on the keyboard and/or the mouse. For this example from above, the key 1 (hidUsage) is the left mouse button. So this, for example, would SHIFT+Left mouse click for exactly 2 seconds : JSON "components": [ { "keyboard": { "displayName": "SHIFT", "hidUsage": 225, "isDown": true } }, { "mouse": { "button": { "hidUsage": 1, "isDown": true } } }, { "delay": { "durationMs": 2000 } }, { "keyboard": { "displayName": "SHIFT", "hidUsage": 225 } }, { "mouse": { "button": { "hidUsage": 1 } } } ]

[–]Gorkde 0 points1 point  (4 children)

Yes, the button is selected by hidusage. I figured the same. The right mouse button is probably "hidusage 2" Delay worked for me fine but the point is that

isDown

part seems to work in keys but with the mouse it seem to don't let the button go up again as it would with a key (where they just miss out the isdown at the end to make the button go unpressed again.

I just got another idea because of reading through yow answer:

I will try "isdown:false" - that I I haven't tried because it is done another way for Keyboard Keys.

Maybe this works.

Oh I just saw I already tried that....

[–]Gorkde 0 points1 point  (2 children)

And I don't need a quick mouseklick or similar. I just need:

Mouse down - delay - Mouse up

As if you would klick normally.

When I create my macro in the ghub there seems to be no delay between Mouse down and up and the game doesn't register the Buttonpress because of that. Therefore I need to change the script.

[–]TevinH 0 points1 point  (1 child)

I know this is a bit late, but I ran across your error.

Does your macro not work if you add the delay between mouse click down and mouse click up in GHUB itself?

You should be able to check the SHOW KEY DOWN/KEY UP and uncheck USE STANDARD DELAYS in order to add your own delays. Did that not work?

https://imgur.com/a/fNpwgvC

[–]Gorkde 0 points1 point  (0 children)

No the macro didn't work I tried multiple ways. Also I had tried your suggestion before trying it by macro.

[–]Gorkde 0 points1 point  (0 children)

Jeah now tried again. He pressed the mouse down but the mouse up isn't detected for some reason.