Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Applescript in External Script still not working....

Featured Replies

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"

activate

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.

Deborah

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

  • Author

Hmmm, maybe. I'll try that and see if it works. Since the script is already IN the contacts file and works fine from there, I hope that the redundancy won't change that. Thanks for the suggestion.

Deborah

  • Author

OK, that worked!

I guess it was just confused :-)

Thanks so much!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.