Multiple macro’s in sequence

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Post Reply
Quentinzna
Posts: 3
Joined: Wed Sep 28, 2022 10:21 am

Multiple macro’s in sequence

Post by Quentinzna »

Hello,

For our intern digital parhology project we would like to program a sequence of macro’s on one button.

Is it possible to write a sequence of macro or sequences of keys with pauzes in between? Something like:
- alt D pauze
- shift enter pauze
- windows key shift left arrow pauze
- alt tab pauze
- ctrl w

It would help LOADS if anyone could help with this
The problem is that the alt d macro is a different type than a simple sequence, and I can’t figure out how to make that work
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Multiple macro’s in sequence

Post by jwick »

The syntax you are looking for is
<Pause>delay in ms</Pause>

You can see samples in our default file: AdCefWebBrowser.xml

I think you will need to edit the XML to insert the Pauses. The GUI used to be able to record the pauses but I'm not sure if that still works.

I suggest recording the macro, then edit the XML to insert the Pauses. You can insert the Pauses anywhere, including between the press and release if needed.
E.g.,
<Sequence>
<KeyPress>E2</KeyPress>
<KeyRelease>E2</KeyRelease>
<Pause>250</Pause>
<KeyPress>1C</KeyPress>
<KeyRelease>1C</KeyRelease>
<KeyPress>16</KeyPress>
<Pause>250</Pause>
<KeyRelease>16</KeyRelease>
<KeyPress>16</KeyPress>
<KeyRelease>16</KeyRelease>
</Sequence>
Quentinzna
Posts: 3
Joined: Wed Sep 28, 2022 10:21 am

Re: Multiple macro’s in sequence

Post by Quentinzna »

Hi @Jwick,

Thanks for the reply.

The problem is I have two different formats:
<KeyStroke>
<Modifiers>
<Modifier>Alt</Modifier>
</Modifiers>
<Key>28</Key>
</KeyStroke>

and

<Sequence>
<KeyPress>E3</KeyPress>
<KeyPress>E1</KeyPress>
<KeyPress>50</KeyPress>
<KeyRelease>E3</KeyRelease>
<KeyRelease>E1</KeyRelease>
<KeyRelease>50</KeyRelease>
</Sequence>

can I add those two macro's/actions under one macro with a pauze in between?
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Multiple macro’s in sequence

Post by jwick »

You can't combine those KeyStrokes with Sequences. They behave very differently.

A KeyStroke sends the press part (alt, 28) when you press the key, then waits until you release the key to send the release part.
A Sequence plays the whole thing in order when you press the key.

I believe our GUI will write the KeyStroke if you just record just one key with the modifier.
If you do all of them in a row you should get a Sequence.

Just record what you want without the Pauses:
Alt key press
D key press
d key release
alt key release
Shift key press
Enter press
etc

Then go back and insert <Pause> where you want.
Post Reply