Autoload jpg to media bin from watched folder (Applescript)

  • Am using an applescript to load media when a new file is added to a watched folder. Fine.
    I think this question is mainly for Mark, since I would need ot know how Isadora internally handles Applescript indexes...
    But due to some limitations of the process I am working with, I use a shellscript bash to delete the current file in a watched folder, then wait a second and copy a new file there with the same name.
    But Isadora fails to autoupload it...(although sometimes it does)....

    Question... is this because the file has the same name, that it is being buggy? 
    By default it should add it to the list, so if there are already 2 files, it would become the thrid file, despite all files having the same name.


  • on adding folder items to this_folder after receiving these_items

            tell application "IsadoraCore USB Key"
                import media into document 1 from these_items
            end tell

    on error msg
            display dialog "Error importing file into Isadora: " & msg
        end try

    end adding folder items to

  • Izzy Guru

    I've wondered this. I use your applescript a lot. The load in works amazing. But I would love to be able to delete a file in the folder and see it be removed from the isadora folder too.

    This would work amazing in conjunction with folder watcher actors. 

  • HI Graham,
    For my recent project I used two watched folders.
    Here's the process:

    Capture Camera to Disk to a Watched folder called (lets call it 'Moviefolder'): this places a quicktime of 0.2 secs long, which is the minimum length that Isadora succeeds to capture.
    Next step is that a folder action script watching the folder where the movie just arrived is triggered and calls a bash shell .sh file that extracts a couple of jpegs from the movie file and moves one of them into another folder called (lets call it 'PictureFolder'). That second folder uses the Applescript that autoloads any media arriving in that folder to load to Isadora's meda bin.
    Ta da!  Now I have a jpg instead of a movie.

    There are some more details involved. In order to process the .mov into a couple of jpgs, I installed Macports and then ffmpeg. Then I can use a bash file to tell ffmpeg to extract the jpgs from the .mov
    I'll attach an example .sh file and the associated Applescript file.
    Have really enjoyed learning how to do this. It's empowering. :)

    A word of warning however, is that occasionally the watched folder simply does not run the Applescript, which seems to be an Apple bug. It works 97% of the ime, but every now and then fails to run, on Mavericks and on Yosemite, which is very annoying if you have a long-running installation.

  • Incase anyone wants it, here is the watched folder Applescript that loads any media arriving in that folder automatically into Isadora's media bin.
    I'll could a blog tutorial on how to use it, if people need more instructions on how to use it?

    Make sure you edit the script to match your version of Isadora. I am using the USB version, so you may need to adapt the application name in the script if you are using the standard version.

  • Beta Platinum

    have to try that, sounds pretty cool