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

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

Recommended Posts

  • Newbies
Posted (edited)

Edit: ALTERNATIVE IN NEXT POST.

I've tried a few different scripts, but i cannot find the answer to this.

	

using terms from application "FileMaker Pro"

		

		tell application "FileMaker Pro"

			

			show database "caller"

			

		end tell

		

	end using terms from





The error it gives is "Expected end of line, etc. but found identifier." and highlights database word.



What i want is a way to open the required database, and paste in the phone number. I am using BluePhoneElite 2 to get the number, so here is all my code so far.







using terms from application "BluePhoneElite 2"



	

	on incoming call theCaller with event "ringing"

		

		tell theCaller

			

			-- set theCallerContent to the number (Caller ID)

			set theCallerContent to the receiver

			

			display dialog theCallerContent -- check to see if it working.

			

		end tell

	

	end incoming call

	

	using terms from application "FileMaker Pro"

		

		tell application "FileMaker Pro"

			

			show database "caller"

			

		end tell

		

	end using terms from

end using terms from



This is my first time scripting, but I've got a database running, and this is my last task. Right now I do see flaws in my code for later on, but right now i just want the database to pop up.

Edited by Guest
Found a different solution
  • Newbies
Posted (edited)

Actually, I went a different way about it using BluePhoneElite 2.

First I got the CallerID using BPE 2, and then saved that number to a text file. Then inside filemaker I ran an import script to get the data into a temp data field, and done a search on the real number. If it exists, then it goes to that record, if it doesn't it pops up to create a new one.

Here is the BluePhoneElite applescript. If someone wants to use it, set the code on "Incoming Phone Call"




-- Getting CallerID and placing it into a text file.



using terms from application "BluePhoneElite 2"

	

	on incoming call theCaller with event "ringing" -- gets the caller on ringing.

		

		tell theCaller

			

			set theCallerC to display value of the caller

			

			-- see if the caller is hiding their number

			

			if theCallerC is missing value then

				

				set theCallerC to "Unknown Caller"

				

				hangup theCaller -- it will hang up the phone.

				

				

			else

				-- if there is no phone number hidden

				

				set theCallerC to caller value -- gets the phone number only

				

				-- display dialog theCallerC -- this was just my check to make sure it was working. This can be edited out!

				

				set thefilepath to (path to desktop as string) & "CallerID.txt" as string

				

				try

					set dataStream to open for access file thefilepath with write permission

					set eof of dataStream to 0

					write theCallerC to dataStream starting at eof

					close access dataStream

				on error

					try

						close access file the_file

					end try

				end try

				

			end if

			

		end tell

		

	end incoming call

	

end using terms from





And my Filemaker code with gPhone 1 as my temp and import it to Phone 1.





Import Records [ Source: “file:../CallerID.txt”; Target: “Contacts”; Method: Add; Character Set: “Mac Roman”; Field Mapping: Source field 1 import to Contacts::gPhone 1 ] [ No dialog ]

# Make sure they have entered something in gPhone 1. If not, stop.

If [ IsEmpty (Contacts::gPhone 1)] 

Show Custom Dialog [ Message: "You haven't entered any data. Please fill in Telephone number :^)"; Buttons: “OK” ] 

Halt Script

End If

# Perform a find using gRegistration entry

Enter Find Mode [ ]

Set Field [ Contacts::Phone 1; Contacts::gPhone 1 ]

Set Error Capture [ On ] 

Perform Find [ ] 

If [ not Get ( FoundCount ) ]

# If record isn't found, give User opportunity to create new Registration using that value.

Show Custom Dialog [ Message: "Registration " & Contacts::gPhone 1 & " not found. Add new one?"; Buttons: “Yes”, “No” ] 

#If YES (choice 1 default) then create a new registration. 

If [ Get ( LastMessageChoice ) = 1 ]

New Record/Request Set Field

Set Field [ Contacts::Phone 1; Contacts::gPhone 1 ]

# If NO (choice 2) then stop.

Else

Show All Records

Halt Script

End If

End If 

Commit Records/Requests

 # If more than one match found	then go to a list view for selection of the correct Registration. 

If [ Get ( FoundCount ) > 1 ]

Go to Layout [ “List View” (Contacts) ]

Halt Script

End If

# Only one registration found (or a new one created). Open a new Registration Window.

Set Field [ Contacts::gPhone 1; "" ]

Go to Field [ Contacts::First Name ]

If people have a better alternative, maybe even a modem phone, then please share : But right now that works, and hopefully it helps someone else out.

Edited by Guest
  • 1 year later...
  • Newbies
Posted

Hello, I'm new in Filemaker and I am looking for a way to make phone call by clicking phone numbers from filemaker database via iphone or any other smart phone.

I tried pushDialer app but that is not make call directly and need to manually click push notification on iphone screen. how can I combine bluephoneelite 2 with filemaker.

thanks in advance for your help. :smile:

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