• 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: Stoping the script until "Enter" is pressed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stoping the script until "Enter" is pressed?


  • Subject: Re: Stoping the script until "Enter" is pressed?
  • From: Mr Tea <email@hidden>
  • Date: Tue, 13 Feb 2001 17:34:30 +0000

This from Maxime Paquette - dateline 2/13/01 3.48 pm:

> The problem, is that I don't know how to know that the "Enter" key, or
> any other key, have been pressed so that I can continue the script.
>
> Any idea how I can do that?

You can use the 'keys pressed' command the free Jon's Additions scripting
addition, if it is practical to distribute this with your script.

It would allow you to use this repeat loop:

repeat until "Enter" is in (keys pressed)
end repeat

... at the point where you want your script to pause.

But (and it's a huge but - just like my wife's! *boom boom*) I don't know
how safe or efficient this would be. This type of repeat loop is quite
'processor intensive' - but you wouldn't want to put a significant delay in
it because the Enter key might get tapped during the delay.

Also, the Enter key does other important stuff in many apps, including the
Finder. You might want to choose a more 'neutral' key for users to press, if
this is an issue.

Cheers

Mr Tea
--
Brew of the day: whatever comes to hand...


  • Follow-Ups:
    • Re: Stoping the script until "Enter" is pressed?
      • From: "Maxime Paquette" <email@hidden>
References: 
 >Stoping the script until "Enter" is pressed? (From: "Maxime Paquette" <email@hidden>)

  • Prev by Date: Re: Out of Memory
  • Next by Date: RE: Changing CDate/MDate
  • Previous by thread: Re: Stoping the script until "Enter" is pressed?
  • Next by thread: Re: Stoping the script until "Enter" is pressed?
  • Index(es):
    • Date
    • Thread