newbie question - opening and saving files via a different application

Please forgive me if I’m asking this question in the wrong place, or even if I’m asking the wrong question!

I’ve been working with Macs since OS 6, and with FileMaker for about 15 years, but I’ve never written an AppleScript!

I don’t know where to start, as all the help and tutorials I’ve found seem to be sending me round in circles, or confusing me.

I want to be able to attach Excel spreadsheets to records in a FileMaker database, so they can be opened by a button in FileMaker.

I’m sure this is possible, but I’ve absolutely no idea where to start.

Please can someone point me in the direction of an unconfusing beginner’s guide, or even point me in the direction of where I might be able to find such a script, or one I can adapt.

(I’m aware the script will be the result of a calculation in FileMaker, but I can do that, it’s what I need to make it say I’m not sure about.)

TIA

Colm (OS 10.4.6, FMPro 8.0v3 and FMServer 8.0v3)

Model: g4 iBook, various other G4 and G5 Macs
AppleScript: 1.10.6
Browser: Firefox 1.5.0.2
Operating System: Mac OS X (10.4)

Think about the workflow involved in doing exactly what you want “by hand”. I don’t have FileMaker, so I can’t help with the script, but before you write a script you need an algorithm in words for what you have to do. Think about that to get started. If you put your request in those terms, folks will respond to the pieces.

Thank you very Adam. Okay, this is what I think I want to do (!)

I want a button in FileMaker that will run an AppleScript which will select a file (using the Open dialogue box?) and return the path and filename to FileMaker. I will then store it in FileMaker.

I then want a button in FileMaker which will run an AppleScript to open that file (being passed its path and filename by FileMaker) in Excel, or other selected files (the choice will happen in FileMaker) in Excel.

So the first script (I think) is:

  • open the Open dialogue box
  • when a file is selected, pass its pathname and filename to FileMaker (including null if nothing has been selected)
    (this may be 2 separate AppleScrips, one to open the dialoogue box, and one to pass the details to FileMaker, I don’t really know)

The second script (I think) is:

  • open path/filename in Excel

I can assign the AppleScripts to buttons in FileMaker, and generate the AppleScripts using FileMaker variables, but I don’t know how to write the actual AppleScripts.

Many thanks.