need help with an app's dictionary entry (Cleaner 6)

hi, i’ve been banging my head against a wall for a day trying to figure out how to code something. bear in mind i’m relatively new to applescript (but not to programming)

i’m trying to write a script to work with the movie compression application ‘Cleaner 6’ (used to be made by Terran, now by Autodesk)

i can add files to the batch in Cleaner to compress, but i need to set their folder destinations and i can’t figure out what the syntax is to do so, i know its got to be simple, but i’m still hazy on how applescript handles classes and properties (i Think thats what i need to work with)

the dictionary entry for the app has this entry:

(C) SetItemCustomDestination‚v
SetItemCustomDestination [DefaultLocation/FTPLocation/FolderLocation]
[CustomLocation string]
[CustomName string]

the only documentation that is available says this:

Changes custom location options for selcted batch items
[DefaultLocation / FTPLocation /FolderLocation ] – the type of custom destination
[CustomLocation string ]-- the name of the custom destination
[CustomName string]-- custom name of the output file

i know what item is selected, i just need some suggestions on syntax before i pull all my hair out.

my current script that works is this (it only adds the file to the batch and compresses it to Cleaner’s default destination…

set fileToAdd to ""
set fileToAddAlias to alias fileToAdd

tell application "cleaner 6"
	Add fileToAddAlias
	Setting {"sd_hi_640x480"}
	Start encoding
end tell

thank you soooo much if you can help or give any suggestions on syntax.

i’ve tried things like:

SetItemCustomDestination with properties { CustomLocation : “HD:temp”, CustomName : “” }

thanks in advance!


if anyone has any Cleaner applescript examples i’d love to see them. autodesk didn’t put any online after they bought the software from Terran)

i also tried this:

tell application "cleaner 6"
	set myloc to {CustomLocation:"WS2:temp:", CustomName:""}
	set SetItemCustomDestination to myloc
end tell

i thought that looked good (it compiled at least), but i got this error:
Can’t set <> of {CustomLocation:“WS2:temp:”,CustomName:"} to <>

Hi Snapplescript –

I also looked all over the web for the solution to this, to no avail. I finally figured it out after many hours of banging my head against the wall:

tell application "cleaner 6"
	AddCustomFolderDestination {name:"WS2:temp:", folderDestination:alias "WS2:temp:"}
	SetItemCustomDestination FolderLocation CustomLocation "WS2:temp:" CustomName ""
end tell

In other words, you first have to set up a custom folder destination – AddCustomFolderDestination is the equivalent of going to “Set Custom Destination…” in cleaner and adding a new entry to the “Folder” section. Then use SetItemCustomDestination, tell it you want to use a FolderLocation (instead of the default location), pass in the NAME of the CustomFolderDestination you created (in this case, the name and the folderDestination are both “WS2:temp:”) and finally pass in the CustomName of the movie, which in your case is “”.

It may be too late for this info to be of help to you, but if this information keeps even one person from going through the frustration I went through, then I’m happy.

jamie ciocco