Questions & Answers

Macros, multiple command exectuion in on line

+7 votes
935 views
asked Jul 6, 2017 in Studio One Feature Requests by risotto (2,250 points)
This is only a request for a better usage and design of macros.

Sometimes if I create a macro I like to execute on single command multiple times. As an example I like to repeat "move start of region" 20 times or anything else. Actually I have to add the single command 20 times after each other which makes the command list a little bit confusing after that.

What about a parameter how often a command should be executed. This will make some macros more clearly and easier to program. :)

4 Answers

+1 vote
answered May 22, 2018 by AlexTinsley (925,250 points)
 
Best answer

Thank you for the feature request. 

If anyone else agrees or disagrees, please VOTE!

The developers pay close attention to those that are voted on the most. 

You are allowed one vote. You can change your vote later if you choose.

(Here's some helpful info on how to use the voting system)

Please vote the original question / feature request. 

Please DO NOT Vote on THIS response!

+2 votes
answered Jul 6, 2017 by justinmeyer (3,020 points)
Sounds like a good idea to me.

Escpecially if you have several lines with different types of commands,

it can take long time to duplicate the first line because the dragged lines will be at the end.

So you have to move them all up (each per one).

I guess something like this is what risotto suggests:



risotto, what do you think about a delay command/line in the macros?

It's been a while since I worked a lot with the S1 macros, but I think there were situations where I thought an internal delay would be helpful.

I had the feeling that a command hasn't been executed fully while the other one was already started...

E.g. instead of

Line 1 command X

Line 2 command Y

this one:

Line 1 command X

Line 2 delay 50 ms

Line 3 command Y

Maybe it's not needed or has been fixed (if there actually were problems due to no delay.)

Regards and thanks for creating this topic!
0 votes
answered Jul 6, 2017 by risotto (2,250 points)
Hi @justinmeyer

thanks for your reply. :)

It has to be investigated if there is really a problem. As I understand the Macros, they are linear in execution which means that the start of the next command will not be triggered until the end of the first command is reached. I don't think there is any kind of parallel processing so normally you shouldn't need a delay for executing the commands correctly but perhaps there could be some areas of application where it is nice. Do you know the macro which caused the problem?

To be honest I don't know what happens if some step inside the macro fails. Does the complete macro returns at this point or does it continue with the next step?
+1 vote
answered Jul 6, 2017 by justinmeyer (3,020 points)
Hi risotto,

I believe you're right that the command lines get executed linearly.

Right now I can't remember what exactly the problem was, but I think the explanation is easy:

There is a difference between sending/executing a command and waiting until it has been completed.

Command 1 is for example: Open the ScratchPad

Command 2 is for example paste the copied event

Even though command 1 was executed, the ScratchPad hasn't been opened yet (for example).

So command 2 gets executed but the result will not be as expected.

(We're speaking about milliseconds.)

So I guess whenever a command takes some milliseconds it can happen that the next command will fail.

(But as said, this is just some theory which must be tested. )

Who knows, maybe it was already fixed - I'll check - Maybe I'll have time this evening to make some tests.
...