• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [X-Post] Triggering a FileMaker Script with AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [X-Post] Triggering a FileMaker Script with AppleScript


  • Subject: Re: [X-Post] Triggering a FileMaker Script with AppleScript
  • From: Deivy Petrescu <email@hidden>
  • Date: Mon, 08 Mar 2010 18:26:25 -0500

On 08/03/2010, at 18:21 , sono-io wrote:

> 	I added some code to my solution, which I thought should work, but I probably didn't do it correctly.  This should repeat up to 3 times, with a pause of 5 seconds between attempts, before exiting, or exit when FileMaker receives the input.
>
> set numberOfTries to 1
> set isFileMakerReady to false
>
> repeat until isFileMakerReady
>
> 	if numberOfTries = 3 then
> 		exit repeat
> 	end if
>
> 	try
> 		tell application "FileMaker Pro Advanced"
> 			activate
> 			go to database "Call Log"
>
> 			set data cell "g_Dialectic_Number" of table "Call_Log" to "711-222-3456"
> 			set data cell "g_Dialectic_Name" of table "Call_Log" to "contact_name"
>
> 			do script FileMaker script "Dialectic Caller ID Lookup"
>
> 			set isFileMakerReady to true
> 		end tell
>
> 	on error e
> 		display dialog "Error: " & e buttons {"OK"} default button 1 with icon 0 giving up after 30 -- for testing only
> 		delay 5
> 		set numberOfTries to numberOfTries + 1
> 	end try
>
> end repeat
>
> The problems I'm seeing are:
>
> 1] the loop is not exiting
> 2] the display dialog that I added for testing purposes to the on error handler is never shown
> 3] when FileMaker does become free, I get double entries in the db
> 4] FileMaker is no longer coming to the foreground when this script is triggered
>
> 	What am I doing wrong?
>
> Thanks,
> Marc



Try this

set numberOfTries to 1
set isFileMakerReady to false

repeat until isFileMakerReady

	if numberOfTries = 3 then
		exit repeat
	end if
	try
		tell application "FileMaker Pro Advanced"
			activate
			go to database "Call Log"

			set data cell "g_Dialectic_Number" of table "Call_Log" to "711-222-3456"
			set data cell "g_Dialectic_Name" of table "Call_Log" to "contact_name"

			do script FileMaker script "Dialectic Caller ID Lookup"

			set isFileMakerReady to true
		end tell

	on error e
		display dialog "Error: " & e buttons {"OK"} default button 1 with icon 0 giving up after 30 -- for testing only
		end try
-- outside the try block!
	delay 5
	set numberOfTries to numberOfTries + 1
end repeat


Deivy Petrescu
email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: [X-Post] Triggering a FileMaker Script with AppleScript
      • From: sono-io <email@hidden>
References: 
 >[X-Post] Triggering a FileMaker Script with AppleScript (From: email@hidden)
 >Re: [X-Post] Triggering a FileMaker Script with AppleScript (From: Deivy Petrescu <email@hidden>)
 >Re: [X-Post] Triggering a FileMaker Script with AppleScript (From: sono-io <email@hidden>)
 >Re: [X-Post] Triggering a FileMaker Script with AppleScript (From: Deivy Petrescu <email@hidden>)
 >Re: [X-Post] Triggering a FileMaker Script with AppleScript (From: sono-io <email@hidden>)

  • Prev by Date: Re: [X-Post] Triggering a FileMaker Script with AppleScript
  • Next by Date: Re: multi input form
  • Previous by thread: Re: [X-Post] Triggering a FileMaker Script with AppleScript
  • Next by thread: Re: [X-Post] Triggering a FileMaker Script with AppleScript
  • Index(es):
    • Date
    • Thread