Dear Friends,
I hope someone else might get some use out of this appeal. I know I’m taking up way too much of you great guys’ time, but I’ll soon have this new OS up to snuff!
In my old OS 9, I used FileMaker Pro with a suite of plugins to be my contact manager, job billing, etc, AND to do my emailing. The databases work well in OS X, and so does the email function. But, I’m missing one thing in the new OS X: my “open location URL” function. I had a small Applescript applet, as follows:
on open location emailURL
set oldDelims to AppleScript’s text item delimiters
set AppleScript’s text item delimiters to “mailto:”
set theAddress to item 2 of the text items of emailURL – get everything after the “mailto:”
set AppleScript’s text item delimiters to oldDelims
tell application "Finder"
activate
beep 2
end tell
tell application "Internet Explorer"
Activate
set theTitle to item 2 of (GetWindowInfo -1)
end tell
tell application "Finder"
activate
beep 2
end tell
tell application "FileMaker Pro"
activate
try
open file "Macintosh HD:02 Lucky Pro:02.01 Lucky Productions:02.01.01 Lucky Business:!!! Current:6_2_1_Corr_Email.fp5"
on error
choose file
end try
do script "New IM from IE"
set data of cell "out Email Address [IM]" of current record to theAddress as string
set data of cell "out Subject [IM]" of current record to theTitle as string
end tell
end open location
As you can imagine, I used the old “Internet” Control Panel to define this applet as the Default Email Application. So, when I clicked on a mailto: URL in a Web page, the call to open the mailto: URL got transferred to my emailing databases. (Filemaker itself, even with the plugins I have, does not, as far as I know, recognize the “open URL” or “GetURL” system events. Hence the need for the intermediary applet. But it worked most of the time!) Now I’m tring to do the same thing in OS X. I’ve rewritten the script slightly, to reflect my understanding of what I’ll need in OS X (and to accomodate a few small changes in my FMP database):
on GetURL(email)
set the text item delimiters to “mailto:”
set email_addressing to text item 2 of email
set the text item delimiters to “@”
set email_name to text item 1 of email_addressing
set email_address to text item 2 of email_addressing
tell application "FileMaker Pro"
activate
try
open alias "Macintosh HD:Users:buckyedgett:02 Lucky Pro:02.01 Lucky Productions:02.01.01 Lucky Business:!!! Current:6_2_1_Corr_Email.fp5"
on error
choose file
end try
do script "New from IE"
set data of cell "Addressing} Out To Name" of current record to email_name as string
set data of cell "Addressing} Out To Email" of current record to email_address as string
end tell
end GetURL
However, when I try to Use OS X’s Mail application to choose my new applet as the default email app, Mail refuses to do it! I can Browse to my applet, and choose it, but when I reopen Mail, it has switched my choice to a different script. How Mail has decided which script to choose on its own, I don’t know.
I do notice that even though I have Finder Prefs set to show extensions, my app has none. I am using Save As in my script Editor, and choosing to show extension, but my app ends up having none in the desktop. If I Get Info on my app, it reads as an application, and the Preview column says it’s an application.
An hour and a half on the phone with Apple Tech Support (I’m still in my first ninety days, can’t you tell?) stumped the experts for sure.
So, heaving a huge sigh of frustration, I beg for help and forgiveness here. A few questions:
- Is my script going to work? Does it look good to you guys?
- Does anyone know why the OS and Mail, refuse to accept my applet as a default email reader?
- You might notice that I’ve left out the Explorer tell. Eventually, I would like to add a routine that might recognise more than one “caller,” or initiator, such as Safari and Explorer, so that I can have my Subject info back, and have it for multiple apps. any suggestions?
Thanks a million for being so accomodating.