Conditional actions in Advanced Scene Switcher

Bruce2704

New Member
I understand that each macro is triggered when certain conditions are met, which is very powerful. However, I would like to know how to construct a macro which performs various actions based on certain further conditions. For example, let's say that a macro is triggered by a hotkey. Then, if Condition A is true, Action A must be performed and if Condition B is true, Action B must be performed.

I understand that I could make separate macros for Condition/Action A and Condition/Action B with additional conditions in the macro trigger (AND, OR, etc.), but that does become rather cumbersome.

What I am asking for amounts to nested conditions. It could reduce substantially the number of macros required and thereby the complexity of one's macro system.

Is there perhaps another way of doing this that I haven't thought of? Coming from a background of traditional programming languages it's taking me a while to learn the Advanced Scene Switcher way of thinking.

Thanks for the help!
 

Bruce2704

New Member
Another application of the nested condition idea I am referring to above is the creation of a loop. For example:

I have a macro that advances an index of source items each time it is run. Before and after advancing the index, certain actions should be performed on the source items at that index. When the macro gets to the last source item it should go back to the first. Ideally, the macro should also check certain conditions on a source item before performing the actions.

Setting up this kind of functionality seems very difficult if it is only possible to create one set of conditions for the execution of a macro.

In a traditional progamming language one would use this kind of logic:

When scene is changed:
Code:
Set index = 1
   Make source_item(1) visible


On pressing hotkey for Advance_source_item macro:
Code:
Make source_item(index) invisible
   If index < source_item_count
      index = index + 1
   Else
     index = 1

   If source_item(index) = "video"
      Make source_item(index) visible

I can't see a way of implementing this easily in Advanced Scene Switcher. What am I not understanding?
 
Top