Can't make this one command trigger...

Ok, I’m really really close to getting thi script to do exactly what I want. Basically we have an automated recorder. This recorder places a file (pick any format you like) into a folder on a Mac. From there I want Toast to pick up the file, create a video DVD (no menu), then create a disc image.

I have it up to the point where Toast picks up the file and creates a Video DVD, but I seem to be missing something on the last step. The Toast dictionary says that there’s a ‘sawe as disc image’ command, but I can’t seem to make her fly. Being as this is my first Applescript, I was hoping someone here could maybe help?

Here is the code:

on adding folder items to this_folder after receiving these_items
	tell application "Toast 6 Titanium"
		activate
		make new Video disc
		add to current disc items these_items
		set the title of the current disc to these_items
		save as disc image these_items
	end tell
end adding folder items to

Thanks everyone

Instead of:

save as disc image these_items

Try:

save as disc image items these_items

Peter B.

Tried that too, no luck… same problem as before (which is getting annoying). It must be something simple that I’m missing here!

B

From the dict:

Where the “reference” is “current disc” and you must provide a file path to the “as disc image” parameter. For example:

save current disc as disc image ((path to desktop as text) & "test.toast")

Ok, that works great… I can now see the image exacly as I would expect.

A followup question or two if I may… The image name needs to be set to the name of the file imported, which in my script is the variable these_items. I can see where to change the image name from test.toast to anythingstatic.img… But I can’t figure out how to make that my variable.

Problem #2, I understand the ‘path to desktop’, that makes perfect sence if I want to go to my desktop… But I actually need to save this to a network SMB share. I assum that I could use the next “path:folder:here” to force an exact path, but how can I tell the script to save it to the Rimage SMB share? Or can I?

Hope these are not RTFM questions. If they are, I would greatly appreciate a point at the right manual.

Thanks guys,

B

As “these_items” is a list of files, you can get the name of the first item in such list as follow:

set firstItemName to name of (info for (these_items's item 1))

Then, use “firstItemName” instead of “these_items” in the “set title” statement.

I don’t know it exactly, but if the SMB volume is mounted and works as a regular disk, you can just use the path. Eg, “SMBVOLUMENAME:subdir:filename.toast”