[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead
Tynsoe Projects • View topic - iTunes Script trouble

iTunes Script trouble

iTunes Script trouble

Postby Internetmexican » Wed Oct 20, 2010 11:13 pm

I just started using geektool about 2 days ago
since i have no knowledge on applescripts or any other form of code i have been getting my current codes and scripts from other people or friends who know something here or there. recently i've tried to use this script for iTunes, when i put it into the applescript editor and test it, the script works fine but once i save the script and try to run it through geektool it will not work at all the script im using at the moment is


set the_string to ""

tell application "iTunes"
if player state is playing then
set the_string to "\"" & name of current track & "\""
if artist of current track is not "" then
set the_string to the_string & " - " & artist of current track
end if
if album of current track is "" and year of current track is 0 then
set the_string to the_string
else if album of current track is not "" and year of current track is not 0 then
set the_string to the_string & " (" & album of current track & ", " & year of current track & ")"
else if year of current track is not 0 then
set the_string to the_string & " (" & year of current track & ")"
else if album of current track is not "" then
set the_string to the_string & " (" & album of current track & ")"
end if
else
set the_string to "Not Playing"
end if
end tell

return the_string

which saved titled "iTunes" so what i type into the command line is, "Users/internetmexican/documents/geektool/itunes.scpt
this has been bugging me but i have not been able to find a fix, i tried a couple other codes that people suggested but they did not work on the script editor.
Internetmexican
 
Posts: 1
Joined: Wed Oct 20, 2010 11:01 pm

Re: iTunes Script trouble

Postby ybizeul » Sat Oct 23, 2010 2:09 pm

Hi,

Just replace

"Users/internetmexican/documents/geektool/itunes.scpt"

by

"osascript /Users/internetmexican/Documents/geektool/itunes.scpt"

Be carefull that most OSX installation's path are case sensitive, so Documents != documents
ybizeul
Site Admin
 
Posts: 133
Joined: Fri Jan 22, 2010 4:34 pm


Return to GeekTool

Who is online

Users browsing this forum: No registered users and 8 guests

cron