--PandoraJam Launcher 1.04
--Mar 10, 2009 4:08 AM
--© Jeff Porten 2009
--Latest version here: http://www.jeffporten.com/?p=933
--Donations accepted if you find this script useful
--1.04: increased delay to 3 seconds out
--1.02: changed delay time to quarter-second in, 1 second out
--TODO: is launcher affecting thumbs up/down controls?
--TODO: is UseLauncher pref expiring?
tell application "Finder"
--look for CTF in user folder and /Library
set c2fLoc to false
if exists file "ClickToFlash.plugin" of folder "Internet Plug-Ins" of (path to library folder) then
set c2fLoc to file "ClickToFlash.plugin" of folder "Internet Plug-Ins" of (path to library folder)
else if exists file "ClickToFlash.plugin" of folder "Internet Plug-Ins" of (path to library folder from user domain) then
set c2fLoc to file "ClickToFlash.plugin" of folder "Internet Plug-Ins" of (path to library folder from user domain)
end if
--this might break or ask for a password when run from a non-admin account; I haven't tested this
if c2fLoc is not false then -- a document value isn't considered "true" by AppleScript? Silly.
set c2fHome to c2fLoc's folder
move c2fLoc to (path to desktop folder)
delay 0.25
tell application "PandoraJam"
activate
end tell
delay 3
move (file "ClickToFlash.plugin" of (path to desktop folder)) to c2fHome
end if
end tell