Jump to content
josh22

[SOLVED] Skip iTunes script stopped working!

Recommended Posts

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

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...