Click and drag files in Toast Titanium

This time my requirements are quite different than before.

I am using TOAST Titanium to burn DVDs and I need a way to easily bring files into this software. At this time the way I am doing it is by browsing into the different folders, click and drag the video sequence into TOAST.

Is it possible to automate within a AppleScript program the click and drag function from the FInder to TOAST Titanium.

I am sorry, this is difficult for me to explain.

Regards!
Daniel

Hi Daniel,

It’s easy enough to add files to a Toast project with applescript but my question is are the files that you want to add to the the project in the same folders each time or does the location of the folders vary? Applescript allows you to select multiple files or you could repeat the process of choosing files until you’ve selected all the necessary files from the varying folders. Below is an example of choosing multiple files.

set files_to_add to choose file with multiple selections allowed

tell application "Toast Titanium"
	set toast_project to current disc
	add to toast_project items files_to_add
end tell

Thanks,
Nik

WOW Nik,

I really appreciate your help in this matter. You’ve provided me with a way to automate a very repetitive process.

Files are located in dedicated folders, however I will customize the script to select the proper files. I will get on this next week.

I am VERY VERY excited to see this being possible.

MANY THANKS!
Daniel

I wrote this little script and I am getting an error with the command “add to toast_project items files_to_add”. There is something with the expected type. I’ve tried as string, as text, as item as file and still having an error

Would someone know why?

Regards!
Daniel

set InvoiceNo to ""

repeat while InvoiceNo is not equal to 9999
	set {text returned:InvoiceNo, button returned:buttonReturned} to display dialog "Please enter Invoice Number or 9999 to quit:" buttons {"Change Invoice No", "OK"} default button 2 default answer InvoiceNo -- each picture are only 4 character long
	set files_to_add to (path to home folder as text) & "Customer:NIK0" & InvoiceNo & ".MPG"
	display dialog files_to_add
	
	if buttonReturned is "Change Invoice No" then
		set InvoiceNo to ""
	else
		if InvoiceNo is equal to "9999" then
			exit repeat
		end if
		tell application "Toast Titanium (2)"
			set toast_project to current disc
			add to toast_project items files_to_add
		end tell
	end if
end repeat

as the variable name files_to_add and the keyword items implies, Toast expects a list (of alias specifiers)


.
add to toast_project items {files_to_add as alias}
.

Thanks Stefan, it works!

I am trying to automate this process even further. This is why I’ve submitted a new thread called

at http://macscripter.net/viewtopic.php?id=34138