I am new to Geektool and I cannot figure out how to get this script to work in the command part of the shell.
set info to ""
tell application "System Events"
set num to count (every process whose name is "iTunes")
end tell
if num > 0 then
tell application "iTunes"
if player state is playing then
set who to artist of current track
set what to name of current track
set onwhat to album of current track
set how to (time of current track)
set stars to (rating of current track) / 20 as integer
set info to (what & onwhat)
end if
end tell
end if
return info
end run
This works in applescript editor, but i cannont seem to get it to work in the command part of the shell in geektool. This will display iTunes song and album. What step and i missing?
In the shell command, you have to put the path of where that script is saved on your computer. For example, mine is saved as itunestitle in the folder of geektool under my username (rlpaolucci), so you would put this in the shell command:
osascript /User/USERNAME/FOLDER/itunestitle.scpt
...in other words, this is what MINE looks like...
osascript /User/rlpaolucci/geektool/itunestitle.scpt
it took forever for me to understand that...I hope I explained it okay for you.