Is there any way to execute a script by a command from one of the available Remote Control interface.
For example, change the state of a GUI button from a Joystick button:
procedure RemoteUpdateButtons;
begin
if ???????Joystick_bp_1_pressed???????
ExecuteCommand('BPSTUDIO1STATE FONTSTYLE 1');
end
else begin
ExecuteCommand('BPSTUDIO1STATE FONTSTYLE 0');
end;
if ???????Joystick_bp_2_pressed???????
ExecuteCommand('BPSTUDIO2STATE FONTSTYLE 1');
end
else begin
ExecuteCommand('BPSTUDIO2STATE FONTSTYLE 0');
end;
end;
procedure OnLoad;
begin
UpdateAutomationButtons;
end;
For the moment just the “ON/OFF AIR” button is remotable.
The most versatile solution would be using OnExecuteCommand in a Notification Script:
procedure OnExecuteCommand(Command: string);
begin
if Command = 'MYCOMMAND' then begin
// do something
end
else if Command = 'MYOTHERCOMMAND' then begin
// do something else
end;
// and so on
end;
begin
end.
Then assign MYCOMMAND and MYOTHERCOMMAND to the joystick up/down events. (Remember that you can type custom commands in any remote control command list.)
If the sole purpose of you script is to generate another command, you could just assign those commands to the joystick inputs directly. You can also chain multiple commands using a semicolon.
Another option is to make a separate (non-notification) script for each event, and call them with RUNSCRIPT from the joytick remote.