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.

problems with mail app (os x)

Featured Replies

  • Newbies

Hello,

I have an applescript to send a freehand file from filemaker. I need to change the freehand mx file to freehand 9 and send it with mail. The script:

set originFolder to desktop folder

set caminoanexo to choose file with prompt "Selecciona el fichero mx"

set EPS_Location to originFolder & caminoanexo & ".fh9" as string

tell application "FreeHand MX"

open caminoanexo without Dialogs

save last document as FH9 in file EPS_Location without IncludeFHDocInEPS

close last document

end tell

tell application "Mail"

set newMessage to make new outgoing message with properties

{subject:"prueba tal y tal", content:"Atenci

Not really a Filemaker question but I took a stab at it anyway. You need to make three changes to your script (highlighted in bold). This worked in Mail 1.2.5 on my OS X 10.2.8 G4...

set originFolder to desktop folder

set caminoanexo to choose file with prompt "Selecciona el fichero mx"

set EPS_Location to originFolder & caminoanexo & ".fh9" as string

tell application "FreeHand MX"

open caminoanexo without Dialogs

save last document as FH9 in file EPS_Location without IncludeFHDocInEPS

close last document

end tell

tell application "Finder"

set EPS_Location to EPS_Location as alias

end tell

tell application "Mail"

set newMessage to make new outgoing message with properties

{subject:"prueba tal y tal", content:"Atenci

  • Author
  • Newbies

thanks Robert, this work!. And only i need to make this change:

tell application "Finder"

set EPS_Location to EPS_Location as alias

end tell

And is a filemaker question! but i resume the script to only the no working part smile.gif I use filemaker in the script to make the outgoing message (adresss, subject, text, etc) smile.gif If anyone are interested in this, please post or send me a msg.!! Thx Robert!!

You're welcome, lolobo.

Actually, I wouldn't mind a copy of the whole script. Does it run separate from Filemaker or is it executed through ScriptMaker?

  • Author
  • Newbies

The script run from filemaker and as standalone application. The whole script:

set originFolder to desktop folder

set caminoanexo to choose file with prompt "Selecciona el fichero con el material a enviar"

set EPS_Location to caminoanexo & ".fh9" as string

tell application "FreeHand MX"

open caminoanexo without Dialogs

save last document as FH9 in file EPS_Location without IncludeFHDocInEPS

close last document

end tell

tell application "Finder"

set EPS_Location to EPS_Location as alias

end tell

--this part get the filemaker data. U need to define this fields.

tell application "FileMaker Developer"

set the_subject to the cell "subject" of current record of layout "Ordenes"

set the_subject2 to the cell "subject2" of current record of layout "Ordenes"

set the_sender to the cell "emailsender" of current record of layout "Ordenes"

set email_envio to the cell "email" of current record of layout "Ordenes"

end tell

--This part make the message and send it.

tell application "Mail"

set newMessage to make new outgoing message with properties {subject:the_subject & the_subject2}

tell newMessage

set sender to the_sender

make new to recipient at end of to recipients with properties {address:email_envio}

tell content

make new attachment with properties {file name:EPS_Location} at after the last paragraph

end tell

send newMessage

end tell

end tell

That's all!!!

Lolo

Too easy, really. Thanks!

  • 1 year later...

Hi there,

Just came across this thread and tried out a simplified version of it via the Apple Script Editor but cannot get it to work. I was wondering if anyone could take a look and let me know where I am going wrong.

tell application "Mail"

set newMessage to make new outgoing message with properties {subject:"Test Email From Filemaker", content:"Test email content"}

tell newMessage

set sender to "[email protected]"

make new to recipient at end of to recipients with properties {address:"[email protected]"}

tell content

make new attachment with properties {file name:"Hard Disk:Users:markbowen:Desktop:Uploader:account.php"} at after the last paragraph

end tell

send newMessage

end tell

end tell

This sends an email message okay with the to address, from address and subject and body but no attachment is added in. Could someone let me know where I am going wrong. I was pretty sure that I had all the code correct.

Also is there a way instead of sending the email to place it into the 'Drafts' folder instead so that you can send it later?

Any help with this would be greatly appreciated.

Regards,

Mark Bowen

Hi Mark:

How is old Brum :

You need to put an alias before the file path

"make new attachment with properties {file name:alias"Hard Disk:Users:markbowen:Desktop:Uploader:account .php"} at after the last paragraph"

Cheers

from Canada

Hi there,

Are you originally from Birmingham then. Why did you move to Canada?

Thanks for the heads up. After a lot of head scratching and code tweaking I saw this in a small applet someone had made and tried it and it worked! Thanks for the post though.

Take care,

Mark

Create an account or sign in to comment

Important Information

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

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.