I want to do a script, that it can launch VLC player, and in VLC player "Open a file", then "Select a folder", then click on "add" then "play" it. I think that Automator can't do this. But Applescript seems legit, right?

How to build an easy script, that I can save as an application then setup it to the startup folder?

Path : the folder in question /Users/server_raagc/Copy

(I tried automator, then applescript, then terminal with a .plist then another automator combined with an applescript saved as application, all of this in a different way times 36.

My code :

set workflowpath to "/Users/server_raagc/Desktop/FINAAAAAL - copie.workflow" 
set qtdworkflowpath to quoted form of (POSIX path of workflowpath) 
set command to "/usr/bin/automator " & qtdworkflowpath 
set output to do shell script command 

Always an error. Or here trying to code another one. Same thing.

 activate application "VLC"
 tell application "System Events"
keystroke "O" using command down
 end tell
 tell application "System Events" to tell process "VLC"
click button "Parcourir..." of window 1 of window 2
 end tell

The automator Test: Maybe becauce one is an "Watch Me do"?

image desc


This AppleScript will open the specified folder in VLC and begin to play the contents:

tell application "VLC"
  OpenURL "file:///Users/grgarside/Desktop/test/"
end tell
| improve this answer | |
  • It's a great restart, but here the thing is i want to VLC to play a foler, when i do tell application "VLC" OpenURL "/Users/ruedifly/Desktop/SaintvPatrick/ Play end tell Doesn't work for me, 'cause it's folder How can i do that ? – user3525208 Apr 12 '14 at 9:02
  • For me on Snow Leopard running VLC 2.0.7 I had to add a second play to get it to start... Maybe my settings are messed up but the above solution works. – Vic Apr 22 '14 at 19:50

open folder then run script

tell application "Finder" to set cwd to POSIX path of (insertion location as alias)

tell application "VLC"
    OpenURL "file://" & cwd & ""
end tell
| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .