PDA

View Full Version : Add only Quicktime movies to list




thriftinkid
Apr 4, 2008, 09:41 AM
Hey guys, I have some compression software called autodesk cleaner 6.5.1. I am trying to add only the quicktime files from a folder called "finished" on my desktop. The problem is I can't get the files or even the folder to add to the render que. I get the following error:

Cleaner 6.5.1 got an error: Can't make some data into the expected type.

I posted the script I have, and the possible software dictionary commands that I think should somehow relate to getting this script to work. If anyone can help that would be great. I'm new to writing any kind of coding.

script:
tell application "Cleaner 6.5.1" to launch
tell application "Cleaner 6.5.1" to (Add) / Users / comcastcable / desktop / Finished

Possible commands:

Add v : Add a file to the current batch

Add alias : media item to add to the batch

CustomFolderLocation n
properties
name (string, r/o)
folderDestination (file specification, r/o)

GetCustomFolderDestinations v

GetCustomFolderDestinations
→ list of CustomFolderLocation

AddCustomFolderDestination v

AddCustomFolderDestination CustomFolderLocation : custom destination object to add

SetItemCustomDestination v

SetItemCustomDestination [DefaultLocation/FTPLocation/FolderLocation]
[CustomLocation string]
[CustomName string]



Eraserhead
Apr 4, 2008, 12:57 PM
Is this all AppleScript? Why are there [ and ] in it?

thriftinkid
Apr 4, 2008, 01:59 PM
Is this all AppleScript? Why are there [ and ] in it?

Yeah, this is an applescript. When I wrote the script, script editor automatically put them in ().

Eraserhead
Apr 4, 2008, 02:20 PM
I'd go for:

tell application "Cleaner 6.5.1"
add (POSIX file "/Users/comcastcable/desktop/")
end tell

thriftinkid
Apr 4, 2008, 04:25 PM
I'd go for:

tell application "Cleaner 6.5.1"
add (POSIX file "/Users/comcastcable/desktop/")
end tell


I tried out that script with reference to both the folder and the QT's themselves with the following and got this error:

add (POSIX file "/Users/comcastcable/desktop/Finished")
add (POSIX file "/Users/comcastcable/desktop/Finished/*.mov")

Cleaner 6.5.1 got an error: File some object wasn't found.

Eraserhead
Apr 4, 2008, 04:28 PM
Try without the wildcards then.

EDIT: Take a look at this thread (http://forums.macrumors.com/showthread.php?t=274631) for how to get a list of files.

thriftinkid
Apr 4, 2008, 06:39 PM
Try without the wildcards then.

EDIT: Take a look at this thread (http://forums.macrumors.com/showthread.php?t=274631) for how to get a list of files.

I tried it with the wildcards and I got the same results.

Eraserhead
Apr 5, 2008, 04:24 AM
The problem is that you have to get the individual files and then you have to get them in the right format, you may need to use Finder to get the files themselves. Have a play around with it. Applescript can be a bit of a nightmare.

You might have better luck with Automator (http://www.apple.com/macosx/features/300.html#automator).

thriftinkid
Apr 7, 2008, 09:27 AM
The problem is that you have to get the individual files and then you have to get them in the right format, you may need to use Finder to get the files themselves. Have a play around with it. Applescript can be a bit of a nightmare.

You might have better luck with Automator (http://www.apple.com/macosx/features/300.html#automator).

I played around with the script this weekend referencing that link you suggested and I got it working. Thanks for all you help. That was a big step. I am actually using automator to make a plugin, but I had to write that script to get around an action that automator couldnt do.