In Media Composer I have a superbin window with different tabs. I would like to have a macro that toggles through those tabs with one second duration until a certain key is pressed and stop (means: activate) at that position
Basically all I want is to press the 'space bar' to stop at the current position. I used the 'While' action and set a keyboard condition but it does not work.
You set the condition to be "while the space key is down", probably the reverse of what you actually want. Try reversing the logic so it is "while space key is not down":
The condition is evaluated each time the loop returns to its beginning. So if you press the space bar halfway through the loop it will do all the remaining "Move and Click Mouse" actions then stop.
So you'll need an action that clicks at the first (absolute) position and then start your loop, and that loop should contain a single "Move and Click at (180,0)..." and a pause.
You'll still be in for problems -- what happens when you run out of tabs to click? -- so do look for another method. Is there no keyboard shortcut to cycle through the tabs?
Unfortunately there isn't a shortcut for that.
You are right ('what happens when you run out of tabs to click?') This is another problem but since my superbin-interface does not change with the amount of my 7 tabs I could define it to have a loop that goes 7 times right and then 7 times left (a little clumsy and not really a cycle but I could live with that.) I would be already happy to achieve a 'interrupting a loop with a keyboard trigger'-action.
Here are some actions that might do what you want. These aren't stand-alone macros -- copy the action and use them instead of your current "loop through tabs" section.
This should work through tabs the "normal" way -- from tab 7 it will jump back to tab 1:
Set a counter variable for the tab clicked and a text variable for the direction of movement
While the space key is not held down...
a. Move in the current direction of movement to click the next tab
b. Increment the counter
c. If the counter is 7 then you are on the last tab for that direction of movement -- reset counter to 1 and change the direction variable
There's probably cleaner ways to do both of these, especially to exit the loop -- my worry is that you'll have to hold down the space bar for up to 0.5s for it to register, because of the pause.
(You might be able to get around that by changing the "loop" pause to "Pause until space key is pressed" but with a timeout of 0.5s -- it'll only pause for 0.5s if you do nothing but instantly break the pause, return to the loop test, and exit the loop if you press the space bar.)
NIce one, Nige...that works!
The only thing is I have to press the button a little longer.
When I change it 0.2 seconds it works better but I have to be quick!
Anyhow that helps a lot. Thanks so much!
One more thought.
You guys have any idea to have that loop not time-based (0.2 seconds) but by pressing one key multiple times until I reach the tab I want. That would be even more handy.
Hopefully the action will either timeout after 0.5s and the loop will continue, activating the next tab, or you pressing the space bar will cancel the pause and, because the space bar is still down, the loop will cancel and you'll be left with the tab you want selected.