Here is a version with 2 buttons:
<abs contexttype="opengear" id="topLevel" sharedsession="true" style="bg-u:;bg#dark;" virtualheight="947" virtualwidth="1606">
<meta>
<params>
<param access="1" constrainttype="INT_CHOICE" name="Clip List" oid="0x2" precision="0" type="INT32" value="0" widget="7">
<constraint key="0">no clips loaded</constraint>
</param>
<param access="1" maxlength="0" name="RecordClipName" oid="0x3" type="STRING" value="LesNewPanel" widget="3"/>
<param access="1" constrainttype="INT_CHOICE" name="RW Speed" oid="0x4" precision="0" strvalue="-200" type="INT32" value="1" widget="7">
<constraint key="0">0</constraint>
<constraint key="1">-200</constraint>
<constraint key="2">-800</constraint>
<constraint key="3">-1600</constraint>
</param>
<param access="1" constrainttype="INT_CHOICE" name="FF Speed" oid="0x5" precision="0" strvalue="0" type="INT32" value="0" widget="7">
<constraint key="0">0</constraint>
<constraint key="1">200</constraint>
<constraint key="2">800</constraint>
<constraint key="3">1600</constraint>
</param>
<param access="1" constrainttype="INT_CHOICE" name="RecVidInput" oid="0x6" precision="0" strvalue="SDI" type="INT32" value="0" widget="7">
<constraint key="0">SDI</constraint>
<constraint key="1">HDMI</constraint>
<constraint key="2">component</constraint>
</param>
<param access="1" constrainttype="INT_CHOICE" name="RecAudInput" oid="0x7" precision="0" strvalue="XLR" type="INT32" value="1" widget="7">
<constraint key="0">embedded</constraint>
<constraint key="1">XLR</constraint>
<constraint key="2">RCA</constraint>
</param>
<param access="1" constrainttype="INT_CHOICE" name="RecButton" oid="0x8" precision="0" strvalue="Record Clip" type="INT32" value="0" widget="13">
<constraint key="0">Record Clip</constraint>
<constraint key="1">RECORDING</constraint>
</param>
<param access="1" maxlength="0" name="IP Address" oid="0x9" type="STRING" value="10.62.141.18" widget="3"/>
</params>
<lookup id="hosts">
<entry key="BlackmagicDeck1.host"/>
<entry key="BlackmagicDeck1.port">9993</entry>
</lookup>
<style id="ToggleButtons" name="ToggleButtons" value="fg#selectfg;txt-align:center;size:Bigger;bg#panelbg;t:fg#selectfg;t:bg#selectbg;t:size:Bigger;t:txt-align:center;f:bg#panelbg;f:fg#selectfg;f:txt-align:center;f:size:Bigger;"/>
<style id="Transport" name="Transport" value="bdr#control;bg#selectfg;size:Bigger;fg#readonlyfg;txt-align:center;font:default;t:bdr#control;t:bg#selectfg;t:bg-align:center;t:font:default;t:size:Bigger;t:fg#listfg;t:txt-align:center;f:bdr#control;f:bg#control;f:font:default;f:size:Bigger;f:fg#listfg;"/>
<ogscript handles="onload" id="" name="onload">var choices = new Array();
choices.push('Press Load Clips to Initialize');
var choiceConstraint = params.createIntChoiceConstraint(choices);
params.replaceConstraint(0x2, choiceConstraint);
ogscript.putPrivateString('hosts', 'BlackmagicDeck1.host', params.getValue(0x9,0));
//params.setValue(0x9, 0, ogscript.getPrivateString('hosts', 'BlackmagicDeck1.host'));
ogscript.debug('onload complete: ' + params.getValue(0x9, 0));</ogscript>
</meta>
<tab height="817" id="theBiz" left="24" tabposition="north" top="114" width="1561">
<abs name="Production" virtualheight="777" virtualwidth="1547">
<table height="532" right="2" style="bg#dark;bdr:etched;" top="77" width="757">
<tr>
<label colspan="3" fill="both" height="60" name="Record" pheight="60" pwidth="744" style="txt-align:center;font:bold;size:Bigger;" weightx="0" weighty="0"/>
</tr>
<tr>
<label colspan="1" fill="both" left="512" name="Record Clip Name" pheight="108" pwidth="376" rowspan="1" style="txt-align:west" top="25" weightx="1.0" weighty="1.0"/>
<label colspan="1" fill="both" left="849" name="Video Source" pheight="108" pwidth="368" rowspan="1" style="txt-align:west;" top="20" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<param colspan="1" fill="both" left="507" oid="0x3" pheight="114" pwidth="376" rowspan="1" top="66" weightx="1.0" weighty="1.0"/>
<param colspan="1" fill="both" left="849" oid="0x6" pheight="114" pwidth="368" rowspan="1" top="65" weightx="1.0" weighty="1.0">
<task tasktype="ogscript">var Input = params.getStrValue(0x6, 0);
ogscript.debug('configuration: video input: ' + Input);
rosstalk.sendMessage(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.host'), parseInt(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.port')), 'configuration: video input: ' + Input);</task>
</param>
</tr>
<tr>
<dropspot colspan="1" fill="both" pheight="108" pwidth="376" rowspan="1" weightx="1.0" weighty="1.0"/>
<label colspan="1" fill="both" left="848" name="Audio Source" pheight="108" pwidth="368" rowspan="1" style="txt-align:west;" top="104" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<simplegrid colspan="1" fill="both" pheight="130" pwidth="376" rows="1" rowspan="1" weightx="1.0" weighty="1.0">
<button buttontype="push" gpi="3" name="RECORD START" style="bdr#000000;o#000000;size:Bigger;font:bold;bdr:etched;">
<task tasktype="ogscript">var RecClipName = params.getStrValue(0x3, 0).trim();
ogscript.debug(RecClipName);
if (RecClipName != null)
{
rosstalk.sendMessage(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.host'), parseInt(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.port')), ' record: name: ' + RecClipName + ' ');
}
else
{
rosstalk.sendMessage(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.host'), parseInt(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.port')), ' record');
}</task>
</button>
<button buttontype="push" gpi="4" name="RECORD STOP" style="bdr#000000;o#000000;size:Bigger;font:bold;bdr:etched;">
<task tasktype="ogscript">rosstalk.sendMessage(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.host'), parseInt(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.port')), ' stop');</task>
</button>
</simplegrid>
<param colspan="1" expand="true" fill="both" left="849" oid="0x7" pheight="130" pwidth="368" rowspan="1" top="140" weightx="1.0" weighty="1.0">
<task tasktype="ogscript">var Input = params.getStrValue(0x6, 0);
ogscript.debug('configuration: video input: ' + Input);
rosstalk.sendMessage(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.host'), parseInt(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.port')), 'configuration: video input: ' + Input);</task>
</param>
</tr>
</table>
<table height="537" left="75" style="bdr:etched;bg#dark;" top="77" width="630">
<tr>
<label colspan="3" fill="both" height="60" name="Playback" pheight="60" pwidth="616" style="txt-align:center;font:bold;size:Bigger;" weightx="0" weighty="0"/>
</tr>
<tr>
<button buttontype="push" colspan="1" fill="both" insets="2,2,2,2" left="47" name="<html>&#x25b6;</html>" pheight="131" pwidth="209" rowspan="1" style="style:Transport;size:Biggest;" top="38" weightx="1.0" weighty="1.0">
<task tasktype="rosstalk">rosstalk.sendMessage(params.getValue(0x9, 0), parseInt(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.port')), ' play: single clip: true');</task>
<task tasktype="ogparamset">params.setValue(0x5, 0, 0);</task>
<task tasktype="ogparamset">params.setValue(0x4, 0, 0);</task>
</button>
<button buttontype="push" colspan="1" fill="both" insets="2,2,2,2" left="243" name="<html>&#x25a0;</html>" pheight="131" pwidth="209" rowspan="1" style="style:Transport;" top="38" weightx="1.0" weighty="1.0">
<task tasktype="rosstalk">rosstalk.sendMessage(params.getValue(0x9, 0), parseInt(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.port')), ' stop');</task>
<task tasktype="ogparamset">params.setValue(0x5, 0, 0);</task>
<task tasktype="ogparamset">params.setValue(0x4, 0, 0);</task>
</button>
<dropspot colspan="1" fill="both" insets="2,2,2,2" pheight="131" pwidth="186" rowspan="1" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<button buttontype="push" colspan="1" fill="both" insets="2,2,2,2" left="47" name="<html>&#x25c0;&#x25c0;</html>" pheight="98" pwidth="209" rowspan="1" style="style:Transport;" top="151" weightx="1.0" weighty="1.0">
<task tasktype="ogparamset">params.setValueRelative(0x4, 0, 1);</task>
<task tasktype="ogscript">var RWSpeed = params.getStrValue(0x4, 0);
ogscript.debug('play: speed: ' + RWSpeed);
rosstalk.sendMessage(params.getValue(0x9, 0), parseInt(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.port')), ' play: speed:' + RWSpeed);</task>
</button>
<button buttontype="push" colspan="1" fill="both" insets="2,2,2,2" left="243" name="<html>&#x25b6;&#x25b6;</html>" pheight="98" pwidth="209" rowspan="1" style="style:Transport;" top="151" weightx="1.0" weighty="1.0">
<task tasktype="ogparamset">params.setValueRelative(0x5, 0, 1);</task>
<task tasktype="ogscript">var FFSpeed = params.getStrValue(0x5, 0);
ogscript.debug('play: speed: ' + FFSpeed);
rosstalk.sendMessage(params.getValue(0x9, 0), parseInt(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.port')), ' play: speed:' + FFSpeed);</task>
</button>
<dropspot colspan="1" fill="both" insets="2,2,2,2" pheight="98" pwidth="186" rowspan="1" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<param colspan="2" fill="both" id="" insets="2,2,2,2" left="47" oid="0x2" pheight="109" pwidth="422" rowspan="1" top="217" weightx="1.0" weighty="1.0" width="350"/>
<button buttontype="push" colspan="1" fill="both" insets="2,2,2,2" left="428" name="Cue Clip" pheight="109" pwidth="186" rowspan="1" style="size:Big;bg#001E98;" top="217" weightx="1.0" weighty="1.0" width="150">
<task tasktype="ogscript">var CueClip = params.getValue(0x2, 0);
ogscript.debug(CueClip);
rosstalk.sendMessage(params.getValue(0x9, 0), parseInt(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.port')), ' stop');
rosstalk.sendMessage(params.getValue(0x9, 0), parseInt(ogscript.getPrivateString('hosts', 'BlackmagicDeck1.port')), ' goto: clip id: ' + CueClip);</task>
</button>
</tr>
<tr>
<button buttontype="push" colspan="3" fill="both" insets="2,2,2,2" left="47" name="Refresh Clip List" pheight="109" pwidth="612" rowspan="1" style="o#000000;size:Big;bg#D3CF00;" top="271" weightx="1.0" weighty="1.0">
<task tasktype="ogscript">//This is our callback
//We will pass it to the listener and the listener will notify it when
//it has received the complete response to the command we sent
var callbackFunction = function(result) {
//Reset our 'busy' state
ogscript.putObject('busy', false);
//Stop the command sender
ogscript.getListenerById('commandSender').stop();
//ogscript.getAllById('commandSender')[0].stop();
//If we didn't get a result, we can't do much more
if (result == null || result == undefined) {
ogscript.debug('no result');
return;
}
else
{
ogscript.debug('WE GOT SOMETHING!' + result[0]);
}
//If we did, let's update our clip list
params.replaceConstraint(0x2, params.createIntChoiceConstraint(result));
};
//If we are already processing something, we can't process something ELSE
if (ogscript.getObject('busy')) {
ogscript.debug('can\'t do anything. already busy');
} else {
//Put the connection into a known state
ogscript.getListenerById('commandSender').stop();
//ogscript.getAllById('commandSender')[0].stop();
//Mark oursevles as 'busy' so nothing else gets sent
ogscript.putObject('busy', true);
//Store this so the listener knows what to send
ogscript.putObject('sendCommand', 'clips get');
//Add a callback for the listener to call when we are done
ogscript.putObject('callback', callbackFunction);
//start the listener so it can send the command and read the result
ogscript.getListenerById('commandSender').start();
//ogscript.getAllById('commandSender')[0].start();
}</task>
</button>
</tr>
</table>
</abs>
<abs name="Set Up" virtualheight="777" virtualwidth="1547">
<table height="193" id="commsTable" left="124" top="131" width="1197">
<tr>
<label colspan="3" eight="24" fill="both" header="true" height="25" name="Enter deck's IP address, then press "Set"" pheight="25" pwidth="1197" style="txt-align:center;size:Big;" width="800"/>
</tr>
<tr>
<param colspan="1" fill="both" height="100" left="0" oid="0x9" pheight="168" pwidth="897" rowspan="1" style="size:Biggest;" top="0" weightx="1.0" weighty="1.0" width="500"/>
<button buttontype="push" colspan="1" fill="both" height="100" name="Set" pheight="168" pwidth="150" rowspan="1" style="size:Bigger;" weighty="0.75" width="150">
<task tasktype="ogscript">ogscript.putPrivateString('hosts', 'BlackmagicDeck1.host', params.getValue(0x9,0));
ogscript.debug('Set IP address to: ' + ogscript.getPrivateString('hosts', 'BlackmagicDeck1.host'));
var choices = new Array();
choices.push('no clips loaded');
var choiceConstraint = params.createIntChoiceConstraint(choices);
params.replaceConstraint(0x2, choiceConstraint);
params.setValue(0x2, 0, 0);
//Reset our 'busy' state
ogscript.putObject('busy', false);
ogscript.reload('commsTable');</task>
</button>
<listener autostart="false" buttontype="toggle" colspan="1" connecthost="%value[0x9][0]%" connectport="%const['hosts']['BlackmagicDeck1.port']%" delimitertype="newline" fill="both" height="100" id="commandSender" left="0" name="Comms" pheight="168" pwidth="150" style="style:ToggleButtons;" top="0" width="150">
<task tasktype="ogscript">if (event.isConnectEvent()) {
ogscript.rename('ConnectLabel', 'Connected<fg#00FF00>');
var commandToSend = ogscript.getObject('sendCommand');
ogscript.putObject('sendCommand', null);
if (commandToSend != null) {
ogscript.debug('sending command: ' + commandToSend);
this.writeString(commandToSend + '\n', false);
} else {
ogscript.debug ('command to send was null');
}
} else if (event.isMessageEvent()) {
var message = event.getBytesAsString().trim();
var startmsgsearch = message.indexOf('clip count: ');
if (startmsgsearch != -1) {
var clipsnum = message.substr(12, message.length-1);
ogscript.putObject('ClipsNum', clipsnum);
ogscript.putObject('ClipsCount', 0);
ogscript.debug('Number of Clips = ' + clipsnum);
ogscript.putObject('responseBuilder', new Array());
} else {
var clipsnum = ogscript.getObject('ClipsNum');
var clipscount = ogscript.getObject('ClipsCount');
if (clipsnum != null) {
if (clipsnum == clipscount) {
ogscript.debug('end of response');
ogscript.putObject('busy', false);
var responseObject = ogscript.getObject('responseBuilder');
var callback = ogscript.getObject('callback');
if (callback != null) {
ogscript.debug('making callback with ' + responseObject);
callback(responseObject);
}
ogscript.putObject('ClipsNum', null);
ogscript.putObject('ClipsCount', null);
} else if (clipsnum != clipscount) {
var clipnamestart = message.indexOf(':');
var clipnameend = message.indexOf('.mov');
var clipnameparsed = message.substr(clipnamestart + 2, clipnameend - clipnamestart - 2);
ogscript.debug('clip received: ' + clipnameparsed + ' ' + clipnamestart + ' ' + clipnameend + ' ' + clipnameparsed.length);
ogscript.debug('clip received: ' + message);
ogscript.getObject('responseBuilder').push(clipnameparsed);
clipscount++;
ogscript.putObject('ClipsCount', clipscount);
} else {
ogscript.debug('message received ' + message);
}
}
}
} else if (event.isDisconnectEvent()) {
ogscript.rename('ConnectLabel', 'Disconnected<fg#FF0000>');
ogscript.debug('connection closed');
ogscript.putObject('busy', false);
} else {
ogscript.debug('no event info');
}</task>
</listener>
</tr>
</table>
<label height="75" id="ConnectLabel" left="1285" name="Disconnected" style="font:bold;bdr:etched;bg#dark;size:Big;fg#F60505;txt-align:center;" top="7" width="256"/>
</abs>
</tab>
<abs height="75" right="18" style="bg-u:platform:/plugin/com.rossvideo.common.oglml/patterns/ross-150.png;bg-align:center;bg-fill:shrink;" top="11" virtualheight="75" virtualwidth="209" width="209"/>
<label height="83" left="24" name="Blackmagic HyperDeck Control" right="240" style="txt-align:center;size:Big;font:bold;bdr:etched;bg#dark;" top="8"/>
</abs>#DashBoard