Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7884 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

does anyone know of or ever thought up an Applescript that will automatically backup your DB to a CDR?

It should prompt the user to put in a CDR and then copy the files over, rename the CD based on a code, burn using Disc Burner, then eject and instruct the user what to write on the CDR.

sound possible?

I can't find any reference in applescript on the CD burning part. Any ideas??

Posted

I think you're better off getting Toast and scripting that. Presumably you can create a back-up folder that is updated by FM server and then it would be simple to script Toast to burn it to disc. (Unlike with CD burner, you can also burn multiple session to a single disc with Toast.) You can use iDo script scheduler to run your script at a given time. You will of course need to change your CD periodically. I don't think you can script that.

Posted

We are doing CD backups from FM Server at two client locations. FM Server triggers an AppleScript which uses Toast. It work flawlessly at one location and gives a timeout error at the other (even though the CD burns OK). It seems the accepted AppleScript commands vary with the version of Toast. I talked to Roxio at MacWorld and they were absolutely no help at all. They would only say they don't support the AppleScript features.

We first backup to a folder: 2300 CD Backup. Then run this script:

tell application "Toast Lite 5.0.2"

activate

make new Data disc

add to current disc items ("FMS Data:2300 CD Backup" as alias)

set speed to x24

(write current disc as session with asynchronous completion, verification and quitting)

end tell

Sorry I can't be of more help. This is very useful stuff and a very good way to perform FM backups. I have found no resource for such scripts on the web after some hours of searching.

-bd

Posted

thanks for that. I'll certainly try it.

I wanted to use OS X Disc Burner simply to keep costs down for my clients...

I don't know if there is a current lite version of Toast for OS X?

I haven't been able to find anything about this on the web either! All the Applescript books I can find are years old, and whilst that maybe OK for most things, it obviously doesn't cover a lot of the new stuff in OS X...

ho hum.

Posted

Toast 5 with Jam is OS X native, but pricey at $189 for an app with no AppleScript documentation and no factory support. I would try to get info on using the built in burning capabilities under OS X. One would think these should be AppleScriptable...

-bd

Posted

Your timeout error can be solved by using other than the 60 second default for an AE to timeout in applescript. The syntax is simple...

with timeout of 3600 seconds

-- your write command

end timeout

Roxio did have some documentation (example scripts and a few other things) and some part of their site had a forum with some discussion of AppleScript. But AppleScript is always the poor stepchild. (Unfortunately all this is true for Filemaker support of AppleScript.)

If you succeed at scripting Burner, more power to you, but based on my attempts and what I see in the dictionary, I don't think it is possible.

...I had to go out and prove myself wrong. It was long time ago that I made an attempt to rewrite an existing Toast script to use Burner. I thought I would try again and this is what I came up with...

tell application "Disc Burner" to name of current disc

set theName to the result

set theFolderAlias to choose folder

with timeout of 3600 seconds

tell application "Finder" to move theFolderAlias to disk theName

activate

tell application "Disc Burner" to burn current disc

end timeout

I hope that is some help.

(Toast is still a better product though, but free is always hard to argue with.)

Posted

Thanks for the help. I'll try the timeout setting and see if that solves our problem at the one installation.

So far we have not be recommending running FM Server with OS X. There seems to be no speed advantage over OS 9 and it has this annoying habit of corrupting files (probably considered only a small problem by FMI, not so with our clients!).

AppleScript is a poor stepchild. I think this is partially because in it's attempt to look like English, it come up short in the syntax department. It always seemed to me it is obvious how to do something in AppleScript after you have done it. Otherwise, it is more a collection of wrote knowledge than a set of rules from which you can determine how to do something. I think it was a noble attempt, but would have gone farther with a more conventional language syntax.

-bd

Posted

Well I think it is greatly under-appreciated. It is a very powerful, easy to learn and understand, inter-application, fully object-oriented programming language. And FileMaker hasn

Posted

I think the point is because English syntax is ambiguous, Applescript syntax is also ambiguous. You can't always substitute equivalent expressions in Applescript (like you can in virtually any other computer language) and still expect it to work. That's what I find most annoying about it.

Posted

This would probably be fine, but Disc Burner isn't actually an application any more... in OS 10.2.x it is simply part of the finder, I assume...

when you insert a blank CD it just mounts it and allows it to be burnt...

So, a script that asks you to insert a CD - pauses while you do that - then copies over the files when it detects something called Untitled CD (or whatever) then burns, would be ideal..

does anyone know if this is possible?:

tell application "Disc Burner" to name of current disc

set theName to the result

set theFolderAlias to choose folder

with timeout of 3600 seconds

tell application "Finder" to move theFolderAlias to disk theName

activate

tell application "Disc Burner" to burn current disc

end timeout

Posted

Disk burning is actually done by hdiutil

Open terminal and try

man hdiutil

for more info.

Or do a google search on "Disk Copy hdiutil macos x"

Maybe some day someone will write a Dick Copy Wrapper script which you can use.

Unfortunately, you will have to use a do shellscript command from within Applescript, because Disk Copy is not by itself scriptable.

This topic is 7884 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.