<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[ANSWERED] Extracting integer from TCP message &#x2F; TCP In Watcher - Text &#x2F; Dataton Watchout getStatus]]></title><description><![CDATA[<hr />
<p>I am using the TCP In Watcher - Text actor to receive a getStatusreply message from Dataton Watchout via TCP/IP control. My goal is to get the current timeline position in milliseconds as an integer, then perform simple arithmetic on that integer in order to scrub through the Watchout timeline using the Streamdeck+ rotary encoders and Bitfocus Companion.<br /><a></a></p>
<p><br />I have successfully received the message using the following Parsing Pattern:</p>
<pre>
msg:string={00-FF}
</pre>
<p>This is the getStatusreply message I am receiving from Watchout:<span class="write-container"><br /></span></p>
<pre>
Reply "test" false 0 true true false 86398999 true 0 false 21921314
</pre>
<p>What I want to do is extract "86398999" from the message so that I can manipulate it as an integer. This value represents the current timeline position in milliseconds, which ranges from a single digit (0) up to eight digits (86398999). Do I do this inside the TCP In Watchout - Text actor's Parsing Pattern or a different actor?<br /><br />I've read the Decoding and Extracting Data Input Streams document, but I'm a bit lost on how to reach my goal.<br /><br />Here are the parameters of the getStatusreply from Watchout:</p>
<p>&lt;string&gt; Filename - 1 to 256 characters<br />&lt;bool&gt; Busy - 4 or 5 characters<br />&lt;uint&gt; Health - 1 character<br />&lt;bool&gt; Full Screen - 4 or 5 characters<br />&lt;bool&gt; Show Active - 4 or 5 characters<br />&lt;bool&gt; Online - 4 or 5 characters<br />&lt;uint&gt; Current Time - 1 to 8 characters<br />&lt;bool&gt; Show is playing – 4 or 5 characters<br />[&lt;float&gt;] Timeline rate - 1 character<br />&lt;bool&gt; Standby - 4 or 5 characters</p>]]></description><link>https://community.troikatronix.com/topic/8637/answered-extracting-integer-from-tcp-message-tcp-in-watcher-text-dataton-watchout-getstatus</link><generator>RSS for Node</generator><lastBuildDate>Sun, 07 Jun 2026 03:03:41 GMT</lastBuildDate><atom:link href="https://community.troikatronix.com/topic/8637.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 29 Nov 2023 05:19:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [ANSWERED] Extracting integer from TCP message &#x2F; TCP In Watcher - Text &#x2F; Dataton Watchout getStatus on Fri, 01 Dec 2023 02:36:29 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/124">@dusx</a> I'm not surprised that it programmed in a bizarre fashion. That's all I got to work with. Here's to hoping Watchout 7 is a lot cleaner. <br /><br />Makes total sense about the clipboard, it was wishful thinking. I'm also messing around with Vicreo listener and I see I could run a shell script so maybe there's a way still.<br /><br />Ultimately, it's not that important - I've just been talking with programmers about fun ideas to make things faster and more interesting for us since we're stuck with what we have. </p>]]></description><link>https://community.troikatronix.com/post/52946</link><guid isPermaLink="true">https://community.troikatronix.com/post/52946</guid><dc:creator><![CDATA[TonariNoSeinfeld]]></dc:creator><pubDate>Fri, 01 Dec 2023 02:36:29 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] Extracting integer from TCP message &#x2F; TCP In Watcher - Text &#x2F; Dataton Watchout getStatus on Thu, 30 Nov 2023 21:53:21 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2177">@tonarinoseinfeld</a></p><p>Unfortunately the text format provided by Watchout doesn't seem to be following any open standard. It would be great if it was JSON, is there by chance an option to get the data as JSON?</p><p>So there isn't anyway to copy the text to a system clip board with JavaScript in Isadora. The JavaScript actor is very fast using the V8 engine, but it is sandboxed, it can't connect outside of Isadora, and doesn't support any browser specific JavaScript functions, only the core JS specification.</p><p>If you can explain exactly what you are trying to accomplish. step by step, as far as data flow, I will think through your possible solutions.</p>]]></description><link>https://community.troikatronix.com/post/52943</link><guid isPermaLink="true">https://community.troikatronix.com/post/52943</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Thu, 30 Nov 2023 21:53:21 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] Extracting integer from TCP message &#x2F; TCP In Watcher - Text &#x2F; Dataton Watchout getStatus on Thu, 30 Nov 2023 21:23:16 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/124">@dusx</a> This works perfectly! Thank you so much.<br /><br />Is way to copy text to the system clipboard with Javascript? In Watchout you can copy and paste keyframes/tweens into a text editor and view the following text, edit it, and paste it back into Watchout. I'm hoping to have my common opacity fade times as buttons on the Streamdeck. I've tried a few things in Isadora with this code, but part of my roadblock is what actor to use and how to work with the special characters in the text and what actor to use. Below is an example of the text.<br /></p><p>Once I have that figured out, I want to add variables to change the keyframes from the actor input rather than editing the text directly each time I need to add a new fade time. I'll end up adapting this to all of the keyframe/tween types in Watchout.<br /><br />Feel free to just point me in the right direction! I haven't written Javascript from scratch; I always edit things I find online, but would love to change that.</p><pre>
UTF8 DATATON_DFC_DATA_590925_620721_AUC069 {
    "Structure and File Format (C) Copyright Dataton AB" 2022 1
    "WATCHMAKER" 6 7 2 0
    ObjTransferable ObjTransferable struct extends {
        TextTransferable struct extends {
            Transferable struct {
            }
        } {
        }
    } {
        mObjData list object true,
        mClassName string
    } {
        { // mObjData
            TweenPointTrack struct extends {
                TweenTrack struct extends {
                    TweenParam struct {
                    }
                } {
                    mExpanded bool,
                    mHeight int
                }
            } {
                mPoints list TweenPoint struct extends {
                    TweenParam
                } {
                    mTimePos float
                } true,
                mExpr reference TweenExpression struct {
                    mExpr Expression struct {
                        mItems list ExprItem struct {
                        } true
                    },
                    mExprY Expression,
                    mExprZ Expression
                } false
            } {
                true, // mExpanded
                0, // mHeight
                { // mPoints
                    OpacityTweenPoint struct extends {
                        _tween1DValue struct extends {
                            _quadTweenPoint struct extends {
                                TweenPoint
                            } {
                                mSmooth bool
                            }
                        } {
                            mValue float
                        }
                    } {
                    } { 0, false, 0 // mTimePos mSmooth mValue
                    },
                    OpacityTweenPoint { 5, false, 1 } // mTimePos mSmooth mValue
                },
                #0 // mExpr
            }
        },
        "TweenParam" // mClassName
    }
}</pre>]]></description><link>https://community.troikatronix.com/post/52939</link><guid isPermaLink="true">https://community.troikatronix.com/post/52939</guid><dc:creator><![CDATA[TonariNoSeinfeld]]></dc:creator><pubDate>Thu, 30 Nov 2023 21:23:16 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] Extracting integer from TCP message &#x2F; TCP In Watcher - Text &#x2F; Dataton Watchout getStatus on Wed, 29 Nov 2023 17:32:22 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2177">@tonarinoseinfeld</a></p>
<p>assuming the format of the String you receive always has the same number of segments (delimited by spaces), the following Javascript should work nicely for you.<br />It takes the string, splits it into an array of segments based on the space delimiter, then parses the selected segment into base 10 integer.</p>
<p></p>
<pre>
// iz_input 1 "target [0 based]"
// iz_input 2 "watchout reply"
// iz_output 1 "targetSegment"
function main()
{
    var target = arguments[0];
    var segments = arguments[1].split(' ');
    var targetSegment = parseInt(segments[target], 10);
    return targetSegment;
}</pre>
<p>You should be able to paste this into a Javascript actor and feed your text to the second input. <br />The first input needs to be an INT that targets the correct segment (7 is what works for me with your test string).<br /><strong>NOTE</strong>: The Javascript actor has mutable input and outputs, so be sure to mutate them to the correct types. ( like to use Trigger Text, and Trigger Value actors to ensure they are locked to the right types before I connect other actors)</p>]]></description><link>https://community.troikatronix.com/post/52905</link><guid isPermaLink="true">https://community.troikatronix.com/post/52905</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Wed, 29 Nov 2023 17:32:22 GMT</pubDate></item></channel></rss>