I recently posted a message trying to script Toast. That has been resloved. However, since i am generating the script for Toast out of Director, I need Apple Script to return a result of a successful burn back to Director. All I need is a 1 or a 0 to be returned. How do you make AppleScript return a result for Director (or any other program) to read?
I just looked at the dictionary for Toast on an old OS 9 machine and it doesn’t appear to return a result for the ‘write’ command. I don’t have any experience with scripting Toast so maybe someone else can offer a reliable way to confirm a burn. Sorry. :?
I have added a couple of lines of code to the script to re-activate the Director projector after ejecting the CD and this will do the job for me. However, if I could pick your brain just one more time …
Is there any way to using Toast in OS9 to eliminate the prepare disc/burn or eject alert to pops up after putting in a blank disc and to eliminate the eject/burn/cancel alert that appears after my script has already ejected the disc…
The point is, I am developing a Karaoke program that, if all goes well, automatically burns the CD with no user interaction. So far the only actions the user has to take is to hit “prepare” on the first alert and “eject” on the second and unfortunately neither is the highlighted choice or i could add in a button to simulate the enter key in Director…
So I placed that line about user intercation as the first liner in the Toast part of the script but still I get an alert.
Well, to be more specific:
This script only works if a blank CD is put in the drive before activating the script itself. If I wait until Toast requests that I “insert a recordable CD” and I push “cancel” or put in a disc then the script returns a Toast error.
When I added your line of code, Toast hung after ejecting the CD and I had to do a hard restart.
The problem is that, in Toast 5.2, immediately you put a blank disc in the tray, it asks whether you want to burn, eject or prepare it even before the script is run.
I’m now wondering whether you can change the highlighted text on those alert messages. Presently, the default is BURN on the first one and I could do a workaround if PREPARE was the highlighted one. Will Res Edit do that kind of thing? I know I’m probably clutching at straws but…
The deal is that your line doesn’t make any difference. I think the reason is that these alerts are not being generated by Toast but by the system itself.
It’s due to the fact that when I put in a blank disc, the system wants to know what to do with it, before and after the script has run. If I could somehow just set up the system to mount the disc icon without asking what it should do with it then I’m set, because then the second alert would not even be generated. The second alert is because there is a disc ICON on the desktop even after the disc itself has been ejected…
It’s like some sort of unresolved alias issue I think,
As it stands, I can assign a button in Director to represent the Enter key and click the Toast button in that first dialog box instead of Prepare. If I can get Toast to run in Server Mode i.e. in the background the job is done, because clicking on the Toast button instead of prepare eliminates the need for the second dialog box since the ‘Toasting’ resolves the desktop alias.
If you care what is a line of code for running Toast in the background?
open in server mode
Thanks so much for the trouble, It’s comforting to know that MacScripter is out there even just as a sounding board…
This has all generated a massive interest in AppleScript in general for me, I’m so stoked that a newbie could come into scripting with a specific project in mind and pull it off (with help) in two days.
I’m trying to script Toast 5.2 to burn a CD without any user interactions (no pop ups form Toast). I realize this may have already been addressed in a previous thread but I cannot get my script to work correctly.
The following script works unitl it gets to the record option when Toast asks if the disc should be burned as a disc or a session. I want to bypass this and always burn the disk automatically as a disc.
tell application “Toast Titanium 5.2”
open file "YU [Work]:CD's:57214-Facilities CD"
write current disc as disc with ejecting