• 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: APPLE events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: APPLE events


  • Subject: Re: APPLE events
  • From: Jed Verity <email@hidden>
  • Date: Tue, 10 Apr 2001 17:26:36 -0700

Hi Brian,

In these situations, I usually have a flag that will tell the AppleScript to
continue.

For example:

--begin script
tell app "FileMaker Pro" to tell database "dbName" to do script (FileMaker
script "fmpScript"

set statusFlag to "busy"
set zTick to 0
tell app "FileMaker Pro"
tell database "dbName"
repeat until (statusFlag = "not busy") or (zTick = 1000)
set statusFlag to cellValue of cell "global_flag"
set zTick to zTick+1
end
end
end
if zTick  1000
--do stuff
else
--FileMaker script never completed successfully
end
--end script

The "fmpScript" script would, as its last step, set the value of the field
"global_flag" to "not busy" (you could also use a "close" script step and
check for the existence of the db in the idle loop). This will slow things
down a little but will at least wait to continue until the FileMaker script
is done.

HTH,
Jed

On 4/10/01 5:39 PM, you wanted me to know this:

>> G'day Brian
>>
>> If you're using FMP to create line items for an invoice you'd should do
>> it with a link file using the invoice number as a key field.
>> Conceptually this is the relational equivalent of using repeating fields
>> in a file but without the limitations (and it adheres much more closely
>> to a correct relational model).
>>
>>
>> just stick an FMP 'beep' or 'show message' step at the end of the FMP
>> script OR, if you _really_ need AS involved, put a 'perform AS' script
>> step at the end of your scriptmaker script with whatever type of response
>> you'd like (Display Dialog or whatever)
>
> Thanks. But I'm trying to find out about application responses. Beeps don't
> work when I'm in bed and the script is running.
>
>
> It's an existential question. If a script beeps and nobody heard it did it
> really beep?
>
> I want to query an application to see if it's done doing something. I want
> to return a boolean value hopefully, and then continue on with my script.
>
> In Filemaker Proif you trigger a FMP script with an applescript the FMP
> script goes off while applescript continues to run. I need it to wait for
> filemaker to finish and then continue. If my other stuff goes off before
> the import (80,000 memory chip prices) it does no good.
>
> Is this performed with an idle handler or waiting for the application to
> return some kind of status?
>
> Brian Loomis
> Virtual Relations
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


~)~)~)~)~)~)~)~)~)~)~)~)~)
Jed Verity


References: 
 >APPLE events (From: Brian Loomis <email@hidden>)

  • Prev by Date: Re: «event XUVJdtdl» Error
  • Next by Date: Re: What is the quickest way to randomize a list?
  • Previous by thread: APPLE events
  • Next by thread: Problems with URL access
  • Index(es):
    • Date
    • Thread