Jump to content

Applescript in External Script still not working....

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

Recommended Posts

Hello again,

It looks like I might need to post this again. My apologies to be repeating my question....

* * *

I have an email button in my contacts file that opens Outlook with Applescript and enters contact information in the email:

tell application "FileMaker Pro"

set strURL to cell "email" of current record

set strFNAME to cell "First" of current record

set strLNAME to cell "Last" of current record

set strMAILTO to {strFNAME & " " & strLNAME & "<" & strURL & ">"}

end tell

tell application "Outlook Express"


set theMSG to make new draft window with properties {to recipients:strMAILTO}

end tell

It also enters a date and some other information in a log in the same file. This all works fine.

We also have a related Company file with a portal to the contact file that lists all the individual contacts. Today I tried to place a button in the portal row of the Company file that would run the email script as an external script but I keep getting the "Object not found, Error -1728" message.

Here is that script:

Go to related Record [Match company to CONTACT file]

Perform Script [Filename: "Contactcs.fp5" (*), "Send Email"]

The other steps in the External (Contacts) script worked fine (the ones that enter the information in the log).

As a test, I tried linking the new email button in the Company file to other scripts in the contact file and they worked OK. It just won't do the email thing.

Am I missing something (obviously!). Any help would be appreciated.

Thank you.


Link to comment
Share on other sites

I'll bet the Applescript is looking for the fields in the Company file instead of the Contacts file. Applescript for me usually means a fair amount of trial and error, but try this:

tell application "FileMaker Pro"

tell database "Contacts.fp5"

...etc. ...

end tell -- you need another end tell

end tell

Link to comment
Share on other sites

This topic is 7195 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

  • Who Viewed the Topic

    1 member has viewed this topic:
  • Create New...

Important Information

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