(* * Author: rorx * Btime: 2018-04-16 * Mtime: 2018-04-16 *) tell application "VLC" if playing = true then set vlcPlayingItemText to get name of current item set vlcPlayingPathText to get path of current item set filePlaying to (do shell script "echo '" & vlcPlayingPathText & "' | sed 's#^.*/##'") set playingText to "VLC playing: " if filePlaying is equal to vlcPlayingItemText then set playingText to playingText & vlcPlayingItemText else set playingText to playingText & "Item: " & filePlaying & " Name: " & vlcPlayingItemText end if else set playingText to "VLC is not playing" end if get playingText end tell (* * Local Variables: * mode: applescript * coding: utf-8-unix * End: *)