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

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

Recommended Posts

Posted

Hey all,

I'm trying to set variables in AppleScript as properties of the message that is currently visible in the preview pane (currently selected). Here's what I've got.

tell application "FileMaker Pro Advanced"

activate

open "path:FILES.fp7"

end tell

on open theDropped

repeat with oneDrop in theDropped

tell application "Finder"

set thePath to oneDrop as string

end tell

if thePath contains "apple.mail.drag" then

tell application "Mail"

activate

set theSender to sender of message

end tell

display dialog theSender

end if

tell application "FileMaker Pro Advanced"

activate

open "path:FILES.fp7"

set cell "gF_FilePath" of current record to thePath

do script "INSERT_FILE_LOOP"

end tell

end repeat -- go back for another (assuming a one-at-a-time process)

return

end open

The bold section is where I'm having issues. I need it to go to Mail, pull the sender of the message and then go to FileMaker and set a cell with that value. It's giving me a message, "can't set of application "Mail".

Any thoughts on why this isn't working? I can't seem to find any help online. Thanks, in advance, for your help.

Michael

  • Newbies
Posted (edited)

Michael,

Try this:

tell application "Mail"

activate

set theMsg to selection as reference

set theSender to sender of theMsg

end tell

display dialog theSender

Edited by Guest

This topic is 5515 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.