<?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] File browser to open data array files?​]]></title><description><![CDATA[<p>does anyone know a way of opening a previously saved data array file in the same way one might import a media file? i.e. to open a browser window, locate, select and load the data file in a convenient window, rather than typing the name in the actor input &amp; hoping it's loaded.</p>
<p>thanks all!</p>]]></description><link>https://community.troikatronix.com/topic/7031/answered-file-browser-to-open-data-array-files</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 02:25:02 GMT</lastBuildDate><atom:link href="https://community.troikatronix.com/topic/7031.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Dec 2020 14:49:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [ANSWERED] File browser to open data array files?​ on Wed, 09 Dec 2020 16:16:00 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/1435">@woland</a> said:</p>
<blockquote>Kinda a weird workaround, but if you tell them to always save the file into the same folder as the Isadora file (or the desktop), you can have an Automater Applescript waiting for files to be saved into that folder. When they are, the script can check all the names of the .txt files in the folder and save the names into another "Master List" .txt file (with a set name) formatted so that each file your client saves is added as a new line to the "Master List" .txt file. That way, you can have a Data Array actor looking for the Master File that will allow your client to use the Control Panel to select which file name they want to load in. You may want to put this "Master List" Data Array actor and Control Panel in a separate Scene with a separate Control Panel so that you can add a button on your normal Control Panel that jumps you into the Master List/File Select Scene. Either that or always keep it active as a background Scene and add Controls so that you can always use it to select which Data Array actor file your client wants to select for your main Scene.</blockquote>
<p>Here's a <a href="/assets/uploads/files/1607530529307-isadorafolder.zip" target="_blank">zip file</a> with an example file, some sample text files, and an Applescript with some instructions for setup at the beginning.</p><img src="/assets/uploads/files/1607530544587-data-array-file-name-list.png" /><p>Applescript:</p><pre>
(* 
Script written by L Wilson-Spiro, 2020-12-09 
Lucaswilsonspiro.wordpress.com
Technical design consultations for installations, interactive technology, and live performance
Projection and lighting design
Show Control and video programming
Theatrical electrics and carpentry 
Please direct questions to lucaswilsonspiro@gmail.com
I do my best to answer emails as soon as possible.
1) You'll need to put this folder (IsadoraFolder) on your desktop in order for this to work.
2) Whenever you save a new text file with the "File Selection" Data Array actor, make sure that it's saved to the folder "IsadoraFolder" on the desktop.
3) You'll need to follow the instructions here to monitor the folder "IsadoraFolder" on the Desktop in order to run this script whenever a file is added to the folder: https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/WatchFolders.html 
You may need to give this script permission to perform changes.
1) Go to System Preferences &gt; Security &amp; Privacy &gt; Accessibility
2) Click the lock (bottom left) &gt; enter password
3) Click the "+" button
4) In the resulting dialog, locate and select this script (FileNameList)
5) Click the "+" button
6) In the resulting dialog, go to Applications &gt; locate and select "Script Editor"
7) Click the lock again
Resources used:
Applescript find Username: https://discussions.apple.com/thread/3152534
Applescript list of files in folder without extension: https://stackoverflow.com/questions/37299815/applescript-how-do-i-get-get-a-file-list-of-files-in-folder-and-remove-extensio
Applescript list of files in folder with extensions: https://apple.stackexchange.com/questions/342773/can-applescript-get-folder-contents-with-file-extension-exclusion 
Applescript write text to file: https://stackoverflow.com/questions/3780985/how-do-i-write-to-a-text-file-using-applescript
Applescript File paths: https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/ReferenceFilesandFolders.html
Getting AppleScript to output multiple lines to shell  https://gist.github.com/hynkle/7432418
*)
-- FIND USERNAME --
set userName to short user name of (system info)
-- SET FILEPATH TO FOLDER --
set theFolder to "/Users/" &amp; userName &amp; "/Desktop/IsadoraFolder" as POSIX file
-- SET FILEPATH TO FILENAMELIST.TXT --
set textFile to "Users/" &amp; userName &amp; "/Desktop/IsadoraFolder/FileNameList.txt"
-- CREATE MULTI-LINE STRING WITH .TXT FILE NAMES -- 
tell application "Finder"
<pre><code>-- Get full list of names of .txt files in the folder
set fileList to name of every file in folder theFolder whose name extension is "txt"

-- Start process of making each file name on a new line
set myString to "" as text

-- Put each file name on a new line
repeat with myItem in fileList
    set myString to myString &amp;amp; myItem &amp;amp; linefeed
end repeat
</code></pre>
<p dir="auto">end tell<br />
list folder theFolder<br />
-- WRITE LIST OF FILE NAMES TO FILENAMELIST.TXT --<br />
do shell script "echo  " &amp; quoted form of myString &amp; " &gt;  " &amp; quoted form of textFile</p></pre><p></p>
]]></description><link>https://community.troikatronix.com/post/43959</link><guid isPermaLink="true">https://community.troikatronix.com/post/43959</guid><dc:creator><![CDATA[Woland]]></dc:creator><pubDate>Wed, 09 Dec 2020 16:16:00 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] File browser to open data array files?​ on Wed, 09 Dec 2020 13:32:24 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/570">@nic</a></p>
<p>Kinda a weird workaround, but if you tell them to always save the file into the same folder as the Isadora file (or the desktop), you can have an Automater Applescript waiting for files to be saved into that folder. When they are, the script can check all the names of the .txt files in the folder and save the names into another "Master List" .txt file (with a set name) formatted so that each file your client saves is added as a new line to the "Master List" .txt file. That way, you can have a Data Array actor looking for the Master File that will allow your client to use the Control Panel to select which file name they want to load in. You may want to put this "Master List" Data Array actor and Control Panel in a separate Scene with a separate Control Panel so that you can add a button on your normal Control Panel that jumps you into the Master List/File Select Scene. Either that or always keep it active as a background Scene and add Controls so that you can always use it to select which Data Array actor file your client wants to select for your main Scene.</p>]]></description><link>https://community.troikatronix.com/post/43940</link><guid isPermaLink="true">https://community.troikatronix.com/post/43940</guid><dc:creator><![CDATA[Woland]]></dc:creator><pubDate>Wed, 09 Dec 2020 13:32:24 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] File browser to open data array files?​ on Tue, 08 Dec 2020 09:48:44 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/124">@dusx</a> Yes that's sort of what I'm doing at the moment but it's prone to problems as I'm making the patch for a client with a simple control panel interface - they only need it for a specific use &amp; they aren't skilled with Isadora:</p><p>First the client need records the data, names the file &amp; hits save. This is ok apart from the fact that they need to remember not to hit carriage return after typing the name into a text field (which is usual for most save dialogue boxes). This is a minor detail though, the main issue comes on loading as they could have previously named the file anything which means I can't set preset Trigger Texts as you suggest. There's also no real feedback on loading data files. After they've typed a file name in and pressed load there isn't anything to say if they've actually uploaded the correct data and even if it's been uploaded at all (they may have mistyped the name). I suppose we take the complexities of these Save/Open dialogue boxes for granted.</p>]]></description><link>https://community.troikatronix.com/post/43935</link><guid isPermaLink="true">https://community.troikatronix.com/post/43935</guid><dc:creator><![CDATA[nic]]></dc:creator><pubDate>Tue, 08 Dec 2020 09:48:44 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] File browser to open data array files?​ on Mon, 07 Dec 2020 20:12:22 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/570">@nic</a> said:</p>
<blockquote>the user needs to be able to  record and name various sequences and then have the option of choosing which he wants for playback</blockquote>
<p> Can you not use a series of 'Trigger Text' actors to feed the 'file path' input of the Data Array actor?<br />Or even a 'Selector' actor :)<br />Assuming you have a set of txt files in place, you could then switch between them easily.<br /></p>]]></description><link>https://community.troikatronix.com/post/43931</link><guid isPermaLink="true">https://community.troikatronix.com/post/43931</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Mon, 07 Dec 2020 20:12:22 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] File browser to open data array files?​ on Mon, 07 Dec 2020 13:22:11 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@mark</a> Thanks Mark, actually I probably didn't phrase my quesion quite right. I'm making a patch which records keyboard inputs over a set time, stores the data and then plays them back in the same time. the user needs to be able to  <u>record and name various sequences </u>and then have the option of <u>choosing which he wants for playback</u> by picking the name of the recording. The files can all be stored in the same folder as the patch, it's more that I need a way of presenting the files to be loaded like, as you say, a File Open dialog.</p><p>Nic</p>]]></description><link>https://community.troikatronix.com/post/43921</link><guid isPermaLink="true">https://community.troikatronix.com/post/43921</guid><dc:creator><![CDATA[nic]]></dc:creator><pubDate>Mon, 07 Dec 2020 13:22:11 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] File browser to open data array files?​ on Fri, 04 Dec 2020 16:21:39 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/570">@nic</a> said:</p>
<blockquote>does anyone know a way of opening a previously saved data array file in the same way one might import a media file? i.e. to open a browser window, locate, select and load the data file in a convenient window, rather than typing the name in the actor input &amp; hoping it's loaded.</blockquote>
<p>We will add the ability to open a file dialog when you click on inputs like this for the next release.</p><p>But it's actually really simple if you place your data file in the same folder as your Isadora document. When you do this, the file will be found automatically by simply typing the file name. You do not need to type the full path.<br /></p>
<p>For example, if the file <strong>temp.izz</strong> has a Data Array actor, you only need to enter <strong>example-data.txt</strong> into the 'file path' input and it will be found. No path necessary.</p>
<p><img src="/assets/uploads/files/1607098596911-screen-shot-2020-12-04-at-5.16.13-pm.png" style="cursor:pointer" /><br /></p>
<p>It actually says this in the help for the 'file path', but given this has come up for several users, I guess it's not as friendly as it should be. (If you hover over the 'file path' input, you'll see the following at the end of the help text: "Paths that do not begin this way are considered to be partial paths, specified relative to the location of the Isadora document that contains this actor.)<br /></p><p>Finally, I assume that a "File Open" dialog as shown below is what you mean by a "browser window" -- is that right?<br /></p>
<p><img src="/assets/uploads/files/1607098205158-screen-shot-2020-12-04-at-5.08.07-pm.png" style="cursor:pointer" /><br /></p>
<p>Best Wishes,<br />Mark</p>]]></description><link>https://community.troikatronix.com/post/43888</link><guid isPermaLink="true">https://community.troikatronix.com/post/43888</guid><dc:creator><![CDATA[mark]]></dc:creator><pubDate>Fri, 04 Dec 2020 16:21:39 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] File browser to open data array files?​ on Fri, 04 Dec 2020 15:39:22 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2066">@juriaan</a></p><p>You can even use a Second data array to store the filepaths live and then load in the prev one when you open the file again for example..</p><p></p>]]></description><link>https://community.troikatronix.com/post/43887</link><guid isPermaLink="true">https://community.troikatronix.com/post/43887</guid><dc:creator><![CDATA[Juriaan]]></dc:creator><pubDate>Fri, 04 Dec 2020 15:39:22 GMT</pubDate></item><item><title><![CDATA[Reply to [ANSWERED] File browser to open data array files?​ on Fri, 04 Dec 2020 15:38:45 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/570">@nic</a> said:</p>
<blockquote>
	does anyone know a way of opening a previously saved data array file in the same way one might import a media file? i.e. to open a browser window, locate, select and load the data file in a convenient window, rather than typing the name in the actor input &amp; hoping it's loaded.</blockquote>
<p> Use a Control panel with a User actor ? The Data Array actor gives quite some feedback regarding or a file is loaded.<br /></p>]]></description><link>https://community.troikatronix.com/post/43886</link><guid isPermaLink="true">https://community.troikatronix.com/post/43886</guid><dc:creator><![CDATA[Juriaan]]></dc:creator><pubDate>Fri, 04 Dec 2020 15:38:45 GMT</pubDate></item></channel></rss>