Hi @dgreene93
Have you considered using arrays instead of individual parameters for reach of these? Then your tables would just be 3 parameters with the indices of the elements you wanted to add.
<abs contexttype="opengear" dblinqport="2222">
<meta>
<lookup id="hosts">
<entry key="xpn.port">7788</entry>
<entry key="xpn.host">192.168.2.150</entry>
</lookup>
<params>
<param access="1" maxlength="0" name="name" oid="name" precision="0" type="STRING_ARRAY" widget="default">
<value>name goes here1</value>
<value>2</value>
<value>3</value>
<value>4</value>
<value>5</value>
<value>6</value>
<value>7</value>
<value>8</value>
<value>9</value>
<value>10</value>
<value>11</value>
<value>12</value>
<value>13</value>
<value>14</value>
<value>15</value>
<value>16</value>
<value>17</value>
<value>18</value>
<value>19</value>
<value>20</value>
</param>
<param access="1" constrainttype="STRING_CHOICE" maxlength="0" name="Question" oid="q" precision="0" type="STRING_ARRAY" widget="text">
<value>question goes here hqwfhqehfkoewa</value>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<value/>
<constraint>question1</constraint>
</param>
<param access="1" constrainttype="INT_CHOICE" name="s" oid="s" precision="0" type="INT32_ARRAY" value="2;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1" widget="combo">
<constraint key="1">facebook</constraint>
<constraint key="2">twitter</constraint>
<constraint key="3">youtube</constraint>
</param>
<param access="1" constrainttype="INT_CHOICE" name="Preview" oid="p" precision="0" type="INT16_ARRAY" value="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0" widget="button">
<constraint key="0">Preview</constraint>
<constraint key="1">Preview</constraint>
</param>
<param access="1" maxlength="0" name="Take IDs" oid="take_ids" precision="0" type="STRING_ARRAY" widget="default">
<value>1</value>
<value>2</value>
<value>3</value>
<value>4</value>
<value>5</value>
<value>6</value>
<value>7</value>
<value>8</value>
<value>9</value>
<value>10</value>
<value>11</value>
<value>12</value>
<value>13</value>
<value>14</value>
<value>15</value>
<value>16</value>
<value>17</value>
<value>18</value>
<value>19</value>
<value>20</value>
</param>
</params>
</meta>
<tab bottom="5" left="5" right="5" tabposition="north" top="5">
<abs name="Tab 3">
<table bottom="1" left="1" right="1" top="1">
<tr>
<param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="s" orientation="vertical" rowspan="1" showlabel="false" weightx="0.51" weighty="1.0"/>
<param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="name" orientation="vertical" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
<param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="q" orientation="vertical" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
<param colspan="1" expand="true" fill="both" height="40" insets="2,2,2,2" oid="p" orientation="vertical" rowspan="1" showlabel="false" weighty="1.0" width="100">
<task tasktype="ogscript">if (this.getValue() > 0)
{
rosstalk.sendMessage(ogscript.getPrivateString('hosts', 'xpn.host'), parseInt(ogscript.getPrivateString('hosts', 'xpn.port')), 'FOCUS ' + params.getValue('take_ids', this.getIndex()));
this.setValue(0);
}</task>
</param>
</tr>
</table>
</abs>
</tab>
</abs>
As for your clear task, a loop would be very helpful. This script would clear 20 frame buffers:
for (var i = 0; i < 20; i++)
{
rosstalk.sendMessage(ogscript.getPrivateString('hosts', 'xpn.host'), parseInt(ogscript.getPrivateString('hosts', 'xpn.port')), 'CLFB ' + i);
}
If your frame buffers were not sequential, you could get away with listing them in an array:
var bufferList = [1, 12, 14, 5, 2, 30];
for (var i = 0; i < bufferList.length; i++)
{
rosstalk.sendMessage(ogscript.getPrivateString('hosts', 'xpn.host'), parseInt(ogscript.getPrivateString('hosts', 'xpn.port')), 'CLFB ' + bufferList[i]);
}#DashBoard