Jump to content

[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

 

Link to comment
  • vitor changed the title to [SOLVED] Skip iTunes script stopped working!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...