I recently started having a problem with one of my workflow scripts. I am getting the following error in the debugger:
[09:59:50.458] Skip ahead 60 seconds in iTunes[Hotkey] Passing output '' to Run NSAppleScript
[09:59:50.458] ERROR: Skip ahead 60 seconds in iTunes[Run NSAppleScript] {
NSAppleScriptErrorBriefMessage = "Expected \U201cthen\U201d, etc. but found identifier.";
NSAppleScriptErrorMessage = "Expected \U201cthen\U201d, etc. but found identifier.";
NSAppleScriptErrorNumber = "-2741";
NSAppleScriptErrorRange = "NSRange: {57, 5}";
on alfred_script(q)
tell application "iTunes"
if player state is playing then
-- length of current track:
set trackTime to duration of current track
--get the current position time:
set currTime to get player position
--to set new position to 10 seconds ahead:
set currSkip to currTime + 30
-- checks if new position is greater than
-- length of track, and corrects it if it is:
if currSkip > trackTime then
set currSkip to trackTime
end if
set player position to currSkip --skip to new position
end if
end tell
end alfred_script