Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

delicious library apple script

Hello,


I came across an apple script today that looked really useful, It is for delicious library 2 and is supposed to allow the playing of the movie from your virtual shelf through VLC player.

However I can not get it to work.

The script is as follows.


tell first document of application "Delicious Library 2"

set selectedMedia to selected media

repeat with selectedMedium in selectedMedia

set movieUrl to associated URL of selectedMedium


if movieUrl starts with "file://" then

set movieFile to rich text 8 through end of movieUrl

else

set movieFile to (choose file with prompt "Find the file for " \

& name of selectedMedium & ":")


set associated URL of selectedMedium to "file://" & movieFile

end if


tell application "VLC"

activate

open movieFile

fullscreen

end tell

end repeat

end tell

When I try and run it, a syntax error is produced for the \ on the line for

"Find the file for " \

I have sought answers from the script author but no luck, as it was published on the web in 2008.

Any help greatly appreciated.

iMac, Mac OS X (10.6.8)

Posted on Jul 15, 2011 2:47 AM

Reply
Question marked as Best reply

Posted on Jul 15, 2011 3:39 AM

Did you try just removing the backslash?


set movieFile to (choose file with prompt "Find the file for " & name of selectedMedium & ":")

3 replies

Jul 15, 2011 6:56 AM in response to Pierre L.

Pierre's right, but he neglected to explain the problem. What happened is that what should be one line of text has somehow gotten split into two lines of text, and the lines need to be rejoined. Applescript has a special character (option-return) to denote a continuing line: Either that got mangled when someone copied the script to text, or someone typed in the unix continuing-line character (a backslash) because they thought it would work the same.

delicious library apple script

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.