<?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[Reading value of custom UI elements from In-App script]]></title><description><![CDATA[<p dir="auto">Is it possible to read the value of a custom UI element from an In-App script?  I am testing some Modbus devices and I would like the ability to change the value of some of the Modbus data that the script will send based on values from the UI.</p>
]]></description><link>http://64.23.185.212/forum/topic/67/reading-value-of-custom-ui-elements-from-in-app-script</link><generator>RSS for Node</generator><lastBuildDate>Wed, 12 Aug 2026 06:29:22 GMT</lastBuildDate><atom:link href="http://64.23.185.212/forum/topic/67.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Mar 2023 16:04:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Reading value of custom UI elements from In-App script on Mon, 06 Mar 2023 09:45:26 GMT]]></title><description><![CDATA[<p dir="auto">No, creating a dedicated plugin just for UI won't cut it, unfortunately.</p>
<p dir="auto">All plugins (and the in-app scripts) run in isolated runtime environments; directly calling an object (be it a UI element or an IO object such as a socket) created in one runtime from another runtime is not possible. As such, plugins and in-app scripts can only access the UI they make themselves.</p>
<p dir="auto">However, as I said earlier, In-App scripts will soon be able to add UI elements to conveniently fine-tune their parameters.</p>
<p dir="auto">In the meantime, you can use the transmit pane to pass external parameters to your In-App scripts.</p>
]]></description><link>http://64.23.185.212/forum/post/249</link><guid isPermaLink="true">http://64.23.185.212/forum/post/249</guid><dc:creator><![CDATA[Vladimir]]></dc:creator><pubDate>Mon, 06 Mar 2023 09:45:26 GMT</pubDate></item><item><title><![CDATA[Reply to Reading value of custom UI elements from In-App script on Fri, 03 Mar 2023 13:04:19 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for the response.  That is helpful and it should work as a way to achieve what I'm looking to do.  What I didn't make clear in my question though, was that I plan to create the UI element from a plugin.  I would like read the plugin created UI control from an In App Script.  Is that possible?  I would think it is but for whatever reason I can't find documentation or an example on how to do so.</p>
]]></description><link>http://64.23.185.212/forum/post/244</link><guid isPermaLink="true">http://64.23.185.212/forum/post/244</guid><dc:creator><![CDATA[Patrick Murphy]]></dc:creator><pubDate>Fri, 03 Mar 2023 13:04:19 GMT</pubDate></item><item><title><![CDATA[Reply to Reading value of custom UI elements from In-App script on Fri, 03 Mar 2023 02:43:20 GMT]]></title><description><![CDATA[<p dir="auto">Currently, custom UI (forms, toolbars, etc.) can only be created from full-fledged plugins, not from in-app scripts. That's because in-app scripts are <em>volatile</em> by nature; they are supposed to be edited/run/stopped many times by a user -- creating UI elements every time a script is started could produce undesired results.</p>
<p dir="auto">That said, we are still experimenting with this, and some <em>limited level</em> of support for UI from in-app scripts will most likely appear in the upcoming release.</p>
<p dir="auto">However, it is POSSIBLE to pass user-defined values to your in-app scrips -- you can do that using the <strong>transmit pane</strong> (either <em>text</em> or <em>binary</em>, whichever works better in your case):</p>
<pre><code>void main() {
	// read input from the transmit pane

	std.Buffer data;
	getTransmitData(&amp;data);

	// modify data before transmission

	data.insert(0, '\x02');
	data.append("\x0d\x0a");

	// off it goes!

	transmit(data.m_p, data.m_size);
}
</code></pre>
<p dir="auto"><img src="/forum/assets/uploads/files/1677810497154-98a83f30-80ad-46f1-95a5-ea1f3c677b1c-image.png" alt="98a83f30-80ad-46f1-95a5-ea1f3c677b1c-image.png" class=" img-responsive img-markdown" width="1302" height="866" /></p>
<p dir="auto">Hope this works for you!</p>
]]></description><link>http://64.23.185.212/forum/post/242</link><guid isPermaLink="true">http://64.23.185.212/forum/post/242</guid><dc:creator><![CDATA[Vladimir]]></dc:creator><pubDate>Fri, 03 Mar 2023 02:43:20 GMT</pubDate></item></channel></rss>