• 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: Cursor control II
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Cursor control II
      • From: JollyRoger <email@hidden>
  • Prev by Date: Two TID-based text handlers: findtext, removetext
  • Next by Date: Re: Current date in standard additions dictionary
  • Previous by thread: Re: Cursor control II
  • Next by thread: Re: Cursor control II
  • Index(es):
    • Date
    • Thread