Can't get beta to work nor iTunes script

Discuss Max, an open source CD audio extractor and audio converter.
Post Reply
glevethan
Posts: 11
Joined: Sat Jun 03, 2006 2:01 pm

Can't get beta to work nor iTunes script

Post by glevethan » Thu Feb 07, 2008 4:36 pm

Hi
Back here after a week of not visiting and I see that the iTunes script has been posted as has a new unstable release. Sorry however the itunes script generates an error when I attempt to run it (for me) and I cannot for the life of me get the latest unstable of Max to load and run - the application always hangs and freezes. I am running 10.5.1.

Thanks
Gregg

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: Can't get beta to work nor iTunes script

Post by sbooth » Thu Feb 07, 2008 9:32 pm

If you delete Max's preferences do the errors persist? Are there any error messages printed to the console?

chipbutty
Posts: 14
Joined: Sun Feb 24, 2008 12:26 pm

Re: Can't get beta to work nor iTunes script

Post by chipbutty » Sun Feb 24, 2008 12:37 pm

I had problems with both too. The latest unstable max attempts to encode the first track and the application closes. I'm running Tiger 10.4.11

I tinkered with the script and this works for me. Wherever the script mentioned 'date', I changed it to 'year'.

Code: Select all

tell application "iTunes"
	set foundCD to true
	try
		set myCD to some source whose kind is audio CD
	on error errorMessage number errorNumber
		-- error 1728 means the AudioCD was not found, so wait a little 
		if errorNumber is -1728 then
			set foundCD to false
		else
			display dialog errorMessage
		end if
	end try
	if foundCD then
		set CDname to myCD's name
		set myPlaylist to playlist 1 of myCD
		set theTracks to tracks of myPlaylist
		tell application "Max"
			set mc to (count every track of document 1)
			set maxdisk to document 1
		end tell
		set ic to (count theTracks)
		if mc = ic then
			repeat with i from 1 to (count theTracks)
				set atrack to item i of theTracks
				set ar to artist of atrack
				set al to album of atrack
				set tn to track number of atrack
				set tc to track count of atrack
				set ge to genre of atrack
				set co to composer of atrack
				set ye to year of atrack
				set na to name of atrack
				set comp to compilation of atrack
				set com to comment of atrack
				set dn to disc number of atrack
				set dc to disc count of atrack
				tell application "Max"
					set maxtrack to track i of document 1
					if not (rip in progress of maxtrack) and not (encode in progress of maxtrack) then
						set title of maxtrack to na
						set artist of maxtrack to ar
						set year of maxtrack to ye as string
						set genre of maxtrack to ge
						set double integer of maxtrack to co
						--set number of maxtrack to tn
					end if
				end tell
				if i = 1 then
					tell application "Max"
						set title of maxdisk to al
						set artist of maxdisk to ar
						set compilation of maxdisk to comp
						set genre of maxdisk to ge
						set year of maxdisk to ye as string
						set double integer of maxdisk to com
						-- set track count of maxdisk to tc
						-- max doesn't allow setting total tracks
						set double integer of maxdisk to co
						if dn > 1 then
							set disc number of maxdisk to dn
							set total discs to dc
						end if
					end tell
				end if
			end repeat
		else
			display dialog "The iTunes CD track count and the Max CD track count do not match."
		end if
	else
		display dialog "Couldn't get a CD from iTunes. Please retry."
		
	end if
end tell

glevethan wrote:Hi
Back here after a week of not visiting and I see that the iTunes script has been posted as has a new unstable release. Sorry however the itunes script generates an error when I attempt to run it (for me) and I cannot for the life of me get the latest unstable of Max to load and run - the application always hangs and freezes. I am running 10.5.1.

Thanks
Gregg

User avatar
Fuga
Posts: 391
Joined: Mon Jun 05, 2006 8:30 pm
Location: Texas

Re: Can't get beta to work nor iTunes script

Post by Fuga » Sun Feb 24, 2008 2:56 pm

Script as posted works fine here with Max v.8b.

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: Can't get beta to work nor iTunes script

Post by sbooth » Sun Feb 24, 2008 4:55 pm

chipbutty wrote:I had problems with both too. The latest unstable max attempts to encode the first track and the application closes. I'm running Tiger 10.4.11

I tinkered with the script and this works for me. Wherever the script mentioned 'date', I changed it to 'year'.
There might be multiple versions of Max laying around on your system. Year was the old term, the newer versions of Max use Date (as it's more flexible). If you had to change Date back to Year then either the AppleScript dictionary changes didn't take or for some reason an old .sdef is being used.

chipbutty
Posts: 14
Joined: Sun Feb 24, 2008 12:26 pm

Re: Can't get beta to work nor iTunes script

Post by chipbutty » Sun Feb 24, 2008 4:58 pm

That could explain it. I'm a relative newcomer to Macs. How should I make sure there aren't multiple versions of Max running?
sbooth wrote:
chipbutty wrote:I had problems with both too. The latest unstable max attempts to encode the first track and the application closes. I'm running Tiger 10.4.11

I tinkered with the script and this works for me. Wherever the script mentioned 'date', I changed it to 'year'.
There might be multiple versions of Max laying around on your system. Year was the old term, the newer versions of Max use Date (as its more flexible). If you had to change Date back to Year then either the AppleScript dictionary changes didn't take or for some reason an old .sdef is being used.

RonaldPR
Posts: 433
Joined: Tue May 30, 2006 8:27 am
Location: Amsterdam, Netherlands

Re: Can't get beta to work nor iTunes script

Post by RonaldPR » Sun Feb 24, 2008 6:55 pm

Make sure you have only one accessible copy of Max on your system. If you want to keep other versions for whatever reason, archive those applications (for instance zip them) and delete the originals.

chipbutty
Posts: 14
Joined: Sun Feb 24, 2008 12:26 pm

Re: Can't get beta to work nor iTunes script

Post by chipbutty » Mon Feb 25, 2008 9:16 am

Searching with Spotlight only finds one occurrence of Max, 0.7.1. :?
RonaldPR wrote:Make sure you have only one accessible copy of Max on your system. If you want to keep other versions for whatever reason, archive those applications (for instance zip them) and delete the originals.

RonaldPR
Posts: 433
Joined: Tue May 30, 2006 8:27 am
Location: Amsterdam, Netherlands

Re: Can't get beta to work nor iTunes script

Post by RonaldPR » Mon Feb 25, 2008 9:51 am

In your first posting in this thread you mention "The latest unstable Max [...]". Max 0.7.1 is not the latest unstable version. If you did install that latest version, do you remember where (in which location, which folder) you installed it? Spotlight does not search all locations, it is designed to find the average user's own files. If you want to search all of your hard drive and attached other volumes, use a utility like EasyFind: http://www.devon-technologies.com/produ ... index.html

If you did not use the latest unstable, but used an earlier version of Max, that would explain why you needed to change 'date' to 'year' in the script.

chipbutty
Posts: 14
Joined: Sun Feb 24, 2008 12:26 pm

Re: Can't get beta to work nor iTunes script

Post by chipbutty » Mon Feb 25, 2008 1:09 pm

Thanks Ronald. I ran EasyFind (very useful piece of software), deleted all instances of Max, installed the latest unstable build and all appears fine. The script ran ok and Max no longer crashes as reported earlier :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest