Hi Markus,
You can keep the most recent take ID in a parameter and increment the parameter value after each 'take' call. Below is the source to a custom panel that does this.
This panel is just printing the RossTalk messages using ogscript.debug() to the debug console. You can open the debug console from Views > openGear Debug Information.
<abs contexttype="opengear" gridsize="20" id="_top" keepalive="false" style="">
<meta>
<params>
<param access="1" constrainttype="INT_NULL" name="num" oid="num_oid" precision="0" stateless="true" type="INT32" value="101" widget="default"/>
</params>
</meta>
<param expand="true" height="60" left="60" oid="num_oid" showlabel="false" top="40" width="180"/>
<button buttontype="push" height="60" left="60" name="Send RossTalk Messages" top="120" width="180">
<task tasktype="ogscript">var num = params.getValue("num_oid", 0);
ogscript.debug("rosstalk.sendMessage('localhost', 7788, 'SEQI "+num+"');");
num = num+1;
ogscript.debug("rosstalk.sendMessage('localhost', 7788, 'SEQI "+num+"');");
num = num+1;
params.setValue("num_oid", 0, num);</task>
</button>
</abs>
Please let me know if you have any questions.
------------------------------
Dave Sampson
Ross Video
------------------------------