5 Replies Latest reply on Oct 15, 2014 12:01 PM by FentonJones

    Run vlc media player from Filemaker



      Run vlc media player from Filemaker


           I'm looking to write an applescipt (if this is the correct mechanism) to run avi files straight from a filemaker 12 database, using vlc media player.

           1.  Will an applescript perform this function?

           2. Can anyone direct me on how to construct the aplescript?


           Les Patrick

        • 1. Re: Run vlc media player from Filemaker

               Why not just use a container field for the video?

          • 2. Re: Run vlc media player from Filemaker


                 If you really want to use VLI, it is a fairly simple AppleScript. The following assumes that. 
                 This is what the basic would look like, if you ran it from FileMaker, via Perform AppleScript, Native AppleScript. 
                 The field has an OS (old style) path to the file (i.e., "Macintosh HD:Users: etc..).
                 The field is on the layout (it could be hidden, but it must be there).
                 Ignore the "--", as those lines would only be needed if you run the below with the AppleScript Editor app:
                 --tell application "FileMaker Pro Advanced"
                 set file_path to cell "cFile_Path_Mac" of current record
                 --end tell
                 tell application "VLC"
                 open file_path
                 end tell
                 OR you could run this using the other, Perform AppleScript, Calculated AppleScript.
                 The field does not need to be on the layout.
                 I would run this via a Script. I would first set the value into a variable (makes it easier and safer).
                 Set Variable [ $path_mac; Audio_Play::cFile_Path_Mac ]  // i.e., my table name::field name with the file path.
                 Perform AppleScript {Calculated AppleScript}:
                 "tell application \"VLC\"" & ¶ & 
                 "activate" & ¶ &
                 "open alias " & Quote ( $path_mac ) & ¶ & 
                 "end tell"
                 If you want to stop VLC from playing, you could use the following, as just (does not need a script). It can use a button anywhere on the layout (including a Header), as it doesn't need to know what record you're on. It's just telling VLC to stop what it's playing.
                 Perform AppleScript, Native AppleScript:
                 tell application "VLC"
                 end tell
                 P.S. The VLC app can be added into the "Library" list of AppleScript Editor. You can then see what commands it has; not many, but some. 
            • 3. Re: Run vlc media player from Filemaker

              To all who posted with an answer, thank you.  I will try your suggestions in the next few days.


              Thanks again



              • 4. Re: Run vlc media player from Filemaker


                I've tried the Perform applescript (Calculated AppleScript) command and got the following error message

                File reading failed VLC could not open the file "/Volumes:Data:ZVinformatique:CompétitionCourante:34:M2U03403.MPG" (m).

                Your input can't be opened : VLC is unable to open the MRL 'file: ///Volumes%3AData%3AZVinformatique%3ACompe%CC%81titionCourante%3A34%3AM2U03403.MPG'. Check the log for details.

                The video file to be played by VLC is is located under the following directory /Volumes/Data/ZVinformatique/CompétitionCourante/34/M2U03403.MPG

                I have been able to play the file in using the manual approach. However the applescript seems to be problematic. Would someone know why ? 


                Thanks in advance!


                • 5. Re: Run vlc media player from Filemaker

                  AppleScript uses old style path method; if the volume is open: "Data:ZVinformatique:CompétitionCourante:34:M2U03403.MPG"