The idea is that the macro runs all the time in the background and just waits for the user to make certain hotkeys. When they do, it performs the required function and then waits again until they press another hotkey.
Code: Select all
//Ctrl+Alt+C = Channel
OnEvent>Key_Down,C,5,Channel
//Ctrl+Alt+D = Dynamic
OnEvent>Key_Down,D,5,Dynamic
//Ctrl+Alt+L = Limiter
OnEvent>Key_Down,L,5,Limiter
//Ctrl+Alt+M = Compressor
OnEvent>Key_Down,M,5,Compressor
//Ctrl+Alt+E = Expander
OnEvent>Key_Down,E,5,Expander
//Ctrl+Alt+G = Gate
OnEvent>Key_Down,G,5,Gate
//Ctrl+Alr+S = DeEs
OnEvent>Key_Down,S,5,DeEs
Label>mainloop
Wait>0.02
Goto>mainloop
//Channel
srt>Channel
SetFocus>System255 - OnAir 3000 Demo
MouseMoveRel>223,50
LClick
LUp
end>Channnel
GoTo>mainloop
//Dynamic
srt>Dynamic
SetFocus>System255 - OnAir 3000 Demo
MouseMoveRel>331,101
LClick
LUp
end>Dynamic
GoTo>mainloop
//Limiter
srt>Limiter
SetFocus>System255 - OnAir 3000 Demo
MouseMoveRel>604,192
LClick
LUp
MouseMove>526,645
end>Limiter
GoTo>mainloop
//Compressor
srt>Compressor
SetFocus>System255 - OnAir 3000 Demo
MouseMoveRel>608,274
LClick
LUp
end>Compressor
GoTo>mainloop
//Expander
srt>Expander
SetFocus>System255 - OnAir 3000 Demo
MouseMoveRel>606,352
LClick
LUp
end>Expander
GoTo>mainloop
//Gate
srt>Gate
SetFocus>System255 - OnAir 3000 Demo
MouseMoveRel>608,431
LClick
LUp
end>Gate
GoTo>mainloop
//DeEs
srt>DeEs
SetFocus>System255 - OnAir 3000 Demo
MouseMoveRel>229,103
LClick
LUp
end>DeEs
GoTo>mainloop
I found the exact same thing happened when I ran it within MS when I had the GoTo>Mainloop before the end of subroutine tags so I moved it to after the end tag. Without the GoTo>mainloop tags the macro would simply terminate after the first hotkey was pressed.
How can I get the macro to keep running correctly and just wait for the user to press a hotkey?
If it makes a difference the hotkeys could be pressed in any sequence and conceivably the same hotkey could be pressed multiple times.