Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Dial the phone from FileMaker Pro Apps
The OS X version of FileMaker Pro does not support the dial function (who knows why). Anyway, it is a real pain for people who want to dial an individual from their database. I finally figured it out and thought it might be worth sharing, because it may be a long time before the dial function is put back into the program.

Read the rest of the article for the how-to...

Creating an dialing function from FileMaker Pro running OS X

  1. Go to Network preference panel. Select Active Network Ports from the Show drop-down menu.

  2. Click on Internal Modem and then click on Duplicate. Rename to Telephone

  3. Click the check box on Telephone to make it an active port

  4. Go to FMP. Select ScriptMaker from Scripts menu. Click on Create

  5. Clear all predefined actions in the script window.

  6. Double click the Copy function from the list on the left. Check the Select Entire Contents box at the bottom of the window and then Check and Click Specify field to select the field with the phone number you want to dial.

  7. Double click the Perform AppleScript function from the list on the left. Click Specify at the bottom of the box and then, when the window opens, click Script Text button and past the following into the window.
    local thenumber
    tell application "Finder"
    activate
    copy (the clipboard) to thenumber
    end tell
    copy "*67,1-" & thenumber to thenumber
    tell application "FileMaker Pro"
    activate
    ignoring application responses
    tell application "Internet Connect" to connect¬
    configuration "Telephone" to telephone number thenumber
    end ignoring
    display dialog thenumber & return & "Dialing in Progress: Disconnect?"¬
    buttons {"Disconnect"} default button 1 giving up after 10
    tell application "Internet Connect" to disconnect configuration "Telephone"
    end tell
    Note: If you want to eliminate or modify the prefix of the number to be dialed that is in the selected field, change the "*67,1-". It is currently set up to block caller ID and add a 1- in front of the number in the data field.

  8. Save the script and try it out.
BTW, I am not an AppleScripter and want to thank Terry Warwick and Matt Neuburg for their help and suggestions.

[Editor's note: I have not tested this script myself.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[9,390 views]  

Dial the phone from FileMaker Pro | 10 comments | Create New Account
Click here to return to the 'Dial the phone from FileMaker Pro' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Dial the phone from Entourage?
Authored by: SimonDorfman.com on Apr 26, '02 02:25:09PM

Does anyone know of a script that will dial the phone from an Entourage contact? Or could this script be easily modified to do so? I know nothing about scripting...

(I used to be able to dial the phone from an Entourage contact with OS9/Office2001 and a script I downloaded somewhere...)



[ Reply to This | # ]
Dial the phone from Entourage?
Authored by: maclaw on Apr 27, '02 02:15:24AM
Dialing from Entourage... Following is my quick hack version based in good part upon an old OS 9 applescript from Applescript Central (props to that initial author whose name I unfortunately don't know!) plus routines I added to address OS X, my own personal taste, and my specific area code situation in S. Fla. The area code handling routines can be removed, of course, (and I have commented that section for easy identification), but I left it in for this post on the off chance there are others like me living in a locale where certain area codes may or may not be long distance and others may or may not require 10-digit dialing. Also, I tried to incorporate (append, actually) the initial tip for the sake of consistency. There is probably no reason to create a duplicate configuration called "Telephone", but it doesn't hurt (and you would otherwise have to change the configuration name to "Internal Modem" wherever it appears in the script.) One last note -- I haven't actually tested this by calling anyone because it is currently post-2am here and I don't know many people who would appreciate a call right now just to find out if some random applescript works :) Feedback is appreciated. Stealing the script verbatim, without any reference to my contribution, is not appreciated -- you know who you are. Finally... to use the script... paste into Script Editor and save in ~/Documents/Microsoft User Data/Entourage Menu Items. Then run Entourage, highlight a single entry in your Entourage address book, and choose this script from the Entourage Scripts Menu. It will (hopefully) walk you through the rest.
set phoneList to {}
set errString to "This script only works with one contact selected in a list view."

tell application "Microsoft Entourage"
	try
		set s to the selection
		set t to item 1 of s
		if the class of t is contact then set theContact to t
	on error theErr
		display dialog theErr & return & return & errString with icon 1 buttons {"OK"} default button "OK"
		return
	end try
	
	set custList to address book 1's {custom phone number one name, custom phone number two name, custom phone number three name, custom phone number four name}
	
	repeat with i from 1 to 4
		set x to item i of custList
		if x ends with ":" then set x to text 1 thru -2 of x
		set item i of custList to x
	end repeat
	
	set {custName1, custName2, custName3, custName4} to custList
	
	
	try
		set homeNumber to home phone number of theContact
		set workNumber to business phone number of theContact
		set otherHomeNumber to other home phone number of theContact
		set otherWorkNumber to other business phone number of theContact
		set mobileNumber to mobile phone number of theContact
		set mainNumber to main phone number of theContact
		set assistantNumber to assistant phone number of theContact
		set pagerNumber to pager phone number of theContact
		set homeFaxNumber to home fax phone number of theContact
		set workFaxNumber to business fax phone number of theContact
		set custom1 to custom phone number one of theContact
		set custom2 to custom phone number two of theContact
		set custom3 to custom phone number three of theContact
		set custom4 to custom phone number four of theContact
		
		if homeNumber is not "" then set end of phoneList to ("Home: " & homeNumber)
		if workNumber is not "" then set end of phoneList to ("Work: " & workNumber)
		if otherHomeNumber is not "" then set end of phoneList to ("Home 2: " & otherHomeNumber)
		if otherWorkNumber is not "" then set end of phoneList to ("Work 2: " & otherWorkNumber)
		if mobileNumber is not "" then set end of phoneList to ("Mobile: " & mobileNumber)
		if mainNumber is not "" then set end of phoneList to ("Main: " & mainNumber)
		if assistantNumber is not "" then set end of phoneList to ("Assistant: " & assistantNumber)
		if pagerNumber is not "" then set end of phoneList to ("Pager: " & pagerNumber)
		if homeFaxNumber is not "" then set end of phoneList to ("Home Fax: " & homeFaxNumber)
		if workFaxNumber is not "" then set end of phoneList to ("Work Fax: " & workFaxNumber)
		if custom1 is not "" then set end of phoneList to (custName1 & ": " & custom1)
		if custom2 is not "" then set end of phoneList to (custName2 & ": " & custom2)
		if custom3 is not "" then set end of phoneList to (custName3 & ": " & custom3)
		if custom4 is not "" then set end of phoneList to (custName4 & ": " & custom4)
		
		set theName to name of theContact
		if theName = "" then set theName to company of theContact
	on error theErr
		display dialog theErr & return & return & errString with icon 1 buttons {"OK"} default button "OK"
		return
	end try
end tell

if (count of phoneList) = 1 then
	set theResult to phoneList
else
	if (count of phoneList) is greater than 1 then
		try
			set theResult to choose from list phoneList with prompt "Choose a phone number to dial for " & theName & ¬
				":" default items {(item 1 of phoneList)} without multiple selections allowed and empty selection allowed
		on error
			display dialog ¬
				"This script requires a scripting addition that is not installed on your computer. " with icon 1 buttons {"OK"} default button "OK"
		end try
	else
		display dialog "That contact has no phone numbers." with icon note buttons {"OK"} default button "OK"
		return
	end if
end if

if theResult = {} or theResult is false then return
set t to item 1 of theResult
set i to offset of ": " in t
set theNumber to text (i + 2) thru -1 of t


-- Begin Routine to Handle Unique Area Code Situations

set locCheck to offset of 954 in theNumber
if locCheck = 2 then
	display dialog ¬
		"Add Prefix?" & return buttons {"1", "No Prefix"} default button "No Prefix"
	set prefReply to button returned of result
	if prefReply is equal to "No Prefix" then
		set theNumber to theNumber
	else
		copy "1 " & theNumber to theNumber
	end if
else
	set locCheck to offset of 561 in theNumber
	if locCheck = 2 then
		display dialog ¬
			"Add Prefix?" & return buttons {"1", "No Prefix"} default button "No Prefix"
		set prefReply to button returned of result
		if prefReply is equal to "No Prefix" then
			set theNumber to theNumber
		else
			copy "1 " & theNumber to theNumber
		end if
	else
		copy "1 " & theNumber to theNumber
	end if
end if

-- End Routine to Handle Unique Area Code Situations


tell application "Microsoft Entourage"
	activate
	ignoring application responses
		tell application "Internet Connect" to connect ¬
			configuration "Telephone" to telephone number theNumber
	end ignoring
	display dialog theNumber & return & ¬
		"Dialing in Progress:   Disconnect?" buttons {"Disconnect"} default button 1 giving up after 20
	tell application "Internet Connect" to disconnect configuration "Telephone"
	tell application "Internet Connect" to quit
end tell


[ Reply to This | # ]
Dial the phone from Entourage?
Authored by: SimonDorfman.com on Jan 25, '04 12:49:37AM

Hi maclaw,
I finally saw your reply to my comment almost 2 years later! I just tried the script you wrote and it let me choose which phone number to dial (home, cell, fax, etc) and then it tried to dial with internet connect but game me this error:
Internet Connect got an error: NSReceiverEvaluationScriptError: 4

I am using OS 10.3.2. Maybe internet connect changed in panther and that is causing the error? I would be very much appreciate you looking into this and trying to get it working in panther! Thanks for your help!
Simon



[ Reply to This | # ]
Dial the phone from Entourage?
Authored by: SimonDorfman.com on Jan 27, '04 10:47:53PM
I found the old OS9 script and hacked it to get it working with OSX. For anyone interested, you can download the script here: http://www.SimonDorfman.com/Programs/EntourageDialPhoneScript/

[ Reply to This | # ]
Dialing - a more customizable route
Authored by: Krioni on Apr 26, '02 02:50:55PM
You could modify the Script portion to make it even less work. No need to copy a field's value to the clipboard, and thus remove whatever was in it already (which you may have wanted). Instead, get the value right from the field itself. I also put the prefix into a variable. Now, to make this work with your database, all you need to do is put in the prefix and the phone field's name at the beginning of the script below
  -- change what's in the quotes below
property thePrefix: "YOUR PREFIX"
property thePhoneFieldName: "YOUR PHONE FIELD NAME"

tell application "FileMaker Pro"
  activate
  set theNumber to thePrefix & (cell thePhoneFieldName of current record)
  ignoring application responses
    tell application "Internet Connect" to connect¬
    configuration "Telephone" to telephone number thenumber
  end ignoring
  display dialog thenumber & return & "Dialing in Progress:   Disconnect?"¬
  buttons {"Disconnect"} default button 1 giving up after 10
  tell application "Internet Connect" to disconnect configuration "Telephone"
end tell



[ Reply to This | # ]
Dialing - a more customizable route
Authored by: jamesellissteven on Mar 26, '04 04:36:21AM

This didn't work for me - I got a message from Internet Connect saying:

"The Connection has failed because you have not entered a telephone number"

I double checked and the field did contain a telephone number. Any ideas?



[ Reply to This | # ]
Dialing - a more customizable route
Authored by: Bmeador on Apr 04, '04 05:41:44PM

I got the message that "The connection has failed because you have not entered a telephone number".

By the way, what would the script look like if I just wanted to dial the phone number through the speakers?

Thanks



[ Reply to This | # ]
Panther AppleScript bug
Authored by: sreubart on Aug 11, '04 03:07:43PM

There's just one problem with this--it doesn't work in Panther. Last year I wrote a RealBASIC program to let my users easily select from a list of our ISP's access numbers. It then uses AppleScript to send the number over to Internet Connect for dialing.

This worked beautifully in Jaguar, but broke in Panther. For some reason Panther has the telephone number field (and a couple of others) in Internet Connect set as read-only, so you can't put any values into that field. So it complains that you haven't entered a phone number.

I've found a couple of other people who have had the same problem, so I reported it to Apple's bug reporting system 3 months ago. It's still in the "open/verify" status, so at least it appears that they are testing a fix. I hope I don't have to wait for Tiger to see it fixed!



[ Reply to This | # ]
TeamCall client
Authored by: ilja on Apr 26, '02 07:33:19PM

There is a german company called ilink (www.ilink.de) that does a phone dialing application with Apple Script Support for Mac OS X. You will need a supported telephony switch, so I guess its only interesting for larger companies. Demo version is available.



[ Reply to This | # ]
Dial the phone from FileMaker Pro
Authored by: ixplorer on Jan 08, '04 06:54:18PM

Does this work with dgital phone system ? or just analog ?

-i-



[ Reply to This | # ]