[APPLESCRIPT SOLUTION/LOGGED] How to dynamically load media files (videos/photos)
fitussi last edited by mark
I am trying to understand how to dynamically load files into Isadora. I have two folders, one with videos the other with images, which I need to load into Isadora to randomly play (with some processing on the way..). These folders are not static, but created "on the fly", files copied via Dropbox/GDrive/USB-stick *while* the isadora program is running unattended.
Is there a way to dynamically load file lists ? "listen" on a folder for changes, or periodically re-scan a folder (every minute or so).
Thanks for you help!
crystalhorizon Beta Platinum last edited by
@fitussi look at the data array actor
And see this article https://support.troikatronix.c...
You can also do it with apple script. See here https://community.troikatronix...
Michels' comment about apple script is probably the best option.
fitussi last edited by
Thanks for the reply.
Seems like JS can't do it directly. no way to list files in a folder, or load into movie slot.
Applescript is not an option, as we're running this installation on Windows machine (because of the projection specs).
Any other idea ?
I am working on a possible solution.
Please give me the weekend to get back to you.
tincho-genosha last edited by
@dusx Any news on this one>?
We have a solution coming for the next major release of Isadora, but not yet.
mark last edited by mark
If you are using Isadora 3.2.1 or later on macOS? If so, we can adapt this trick from 2015 to accomplish your goal. By making the attached AppleScript a "Folder Action", media will be automatically imported when it is dragged into or saved into a specified folder.
First: Make add-media-to-isadora.scpt Available as a Folder Action Script
- Unzip the attached script "add-media-to-isadora.scpt"
- In the Finder, choose Go > Go To Folder... and enter the following path into the dialog: /Library/Scripts/Folder Action Scripts
- Click "Go"
- Drop the "add-media-to-isadora.scpt" into the "Folder Actions Scripts" folder.
- If asked, confirm adding the script t to Folder Actions Scripts folder by entering your password.
Second: Attach the Folder Action Script to a Folder:
- Find the folder where your media will appear.
- Control-click that folder in the Finder and from the popup menu choose Services > Folder Actions Setup...
- In the "Confirm Service" dialog that appears (macOS Mojave and later) click "Run Service"
- The Folder Actions Setup app launches. Click the "+" button under the right hand column.
- In the dialog that appears, select the script add-media-to-isadora.
- Click "Attach"
- Finally, make sure to enable the checkbox at the top left labeled "Enable Folder Actions". You may see one or more dialogs asking you for confirmation that you wish to allow this. Say "Yes" or "OK" to all of these.
Third: Try the script:
- Open Isadora
- Copy a media file, like a picture, and then paste it into your Watched Folder.
- Voilá! It appears in the Media View.
Now you can use the Get Media Count actor to keep track of how many items are in the view, and use that value to respond when the number of images. videos, etc, change.
I hope that helps!
bonemap last edited by bonemap
Great to see this update for a really useful function. But unfortunately this no similar options for Windows based systems.
Woland Tech Staff last edited by Woland