Re: Cursor control II
Re: Cursor control II
- Subject: Re: Cursor control II
- From: Chris Nebel <email@hidden>
- Date: Sun, 03 Jun 2001 11:16:24 -0700
- Organization: Apple Computer, Inc.
Robert Poland wrote:
>
Found "Set Cursor" in Jon's Commands. However it's almost useless
>
because of the fact that AppleScript does parallel processing instead
>
of serial. Is there a solution?
>
>
Example:
>
set cursor to busy cursor
>
--process of random time/length
>
set cursor to arrow cursor
>
>
Change to busy cursor and back occurs immediately regardless of time
>
it takes to process.
AppleScript is a single-threaded, serial-processing language. Period. Now
when you're talking to applications, things can get interesting. Because
the application is in a different process than the script, there is the
possibility of the script and the application doing work in parallel.
By default, application commands are synchronous: the script will wait until
the command finishes before going on to the next statement. You can change
this using "ignoring application responses" -- the script will then proceed
without waiting for a response to the command. Also, some applications are
known to reply to commands before they've actually finished doing the work,
but that's normally considered a bug.
I would believe that your "process of random time/length" happens to behave
in an asynchronous way, but it's not true that AppleScript in general
behaves that way.
--Chris Nebel
AppleScript Engineering