PDA

View Full Version : Automatic 'Applescript App' creation?? how to???


hangon
08-22-2003, 06:19 AM
Hi,
I'm using the script from doug named "arrange by artist album" which purpose is to create a Playlist for each album of the Library....

I wan't to customize it but i don't know how...

I want this script to drop on a specified folder an applescript file for each playlist created...
these applescript file will allowed me to launch an album by clicking on them...
i will be abble to put the album artwork as the custom icon for each of these files

i wrote this but it's not working....

set target_folder to (choose folder with prompt "Where do you want to save your AppleScripts?") as string
tell application "Script Editor"
set newdoc to make new document at end with properties ?
{contents:?
("
set playList_name to artist_name & \" - \" & album_name
tell application \"iTunes\"
try
play playlist playList_name
end try
end tell
") ?
}

-- This is where i don't know how to save newdoc to the disk!!!!!!!!

end tell





i don't know how to tell script editor to save a new file with a specific content to a specific place ???

HELP PLEASE!!!!!!!!!!!!

DeltaTee
08-22-2003, 08:37 AM
You need to use the store script command, which is part of the standard additions.

Doug Adams
08-22-2003, 12:44 PM
You want to save the script snippet you have just created in Script Editor. You would have to use something like:

tell application "Script Editor"
set newdoc to make new document at end with properties ?
{contents:?
("
set playList_name to artist_name & \" - \" & album_name
tell application \"iTunes\"
try
play playlist playList_name
end try
end tell
") ?
}
save newdoc
end tell

Learn more about the save application command here (http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptLangGuide/AppleScript.74.html#40186).