Home › Forums › Macros › new user macro help › Reply To: new user macro help
Hi Ploughman,
We will add some more macro examples of Logelloop 5.
The issue in your macro is that the track is selected only when you first launch the macro.
There is no track selection after the WaitUserAction, that’s the issue.
Your macro should contain :
WaitUserAction
SelectTrack @ trk1
TrackMute trk_sel OFF
Your Macro could also be like this :
//***************** Begin ************
//***************** Mute or unMute the selected track ************
DeclareOnce int $trk1_muted$ = 0
SelectTrack @ trk1
If {$trk1_muted$ == 0}
TrackMute trk_sel ON
Set $trk1_muted$ = 1
MacroStop
EndIf
If {$trk1_muted$ == 1}
TrackMute trk_sel OFF
Set $trk1_muted$ = 0
MacroStop
EndIf
//***************** End ************
Or even, with the possibility to know the current state of the mute button :
//***************** Begin ************
//***************** Mute or unMute the selected track ************
SelectTrack @ trk1
If {valueOfReactionNamed(“TrackMute_trk1”) == 0}
TrackMute trk_sel ON
Else
TrackMute trk_sel OFF
EndIf
//***************** End ************
There is an example of the use of valueOfReactionNamed in the macro “Track Settings Copy And Paste”.
Hope this help!
Thank you,
Philippe