Scripting

From kJams Wiki
Revision as of 05:31, 23 February 2007 by Dave (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

You can use AppleScript to cause kJams to export your songs to QuickTime format.

Here is an example script for kJams:

tell application "kJams Producer Debug"
	-- returns the version of kJams that is running
	--version
	
	-- a test property, returns false if kJams is not crashed.  set this to true to make kJams crash
	--crash
	--set crash to true
	
	-- it is okay to add the same song twice from a script, it will only be added once
	-- it is also okay if the song is on a CD, it won't actually add to the library in that case
	-- must pass a POSIX path
	set songID to add to library "/Volumes/SGB0001 - Free Style Jazz Volume 1/7 The Lady Is A Tramp.aiff"
	
	if songID is not 0 then
		-- POSIX path for output folder, tilde is okay for user folder
		export songID encoder "QuickTime Movie" preset "Animation / AAC Best" folder "~/Desktop"
	end if
end tell