• 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: Changing script properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing script properties


  • Subject: Re: Changing script properties
  • From: "Marc K. Myers" <email@hidden>
  • Date: Sat, 30 Jun 2001 09:10:47 -0400
  • Organization: [very little]

> Date: Fri, 29 Jun 2001 17:51:40 -0600
> To: email@hidden
> From: List Kreme <email@hidden>
> Subject: Changing script properties
>
> I suspect this is a very stupid question, but I have a script that has two
> properties that are set on the script's first run. One is an integer, the
> other is the name of a mailbox (this is a script for Eudora).
>
> However, I would like the user to be able to change the property. How do
> you tell an applescript to reset the properties?
>
> Currently, the script is editable, but I want to release it to my users as
> a run-only app. It is intended to be run from Eudora's Script menu, if
> that matters.

AFAIK there's no way to do it in vanilla AppleScript (unless you want to
throw up a dialog each time you run the script). I've done it using the
"keys pressed" command from Jon's Commands and there's also a way to do
it from Akua Sweets. Using "keys pressed", I query if the option key is
pressed while the script is starting up. If it is, I reset the property
to "", which forces the script to go through it's first-time routine to
set the property.

One other approach: if the script is normally run as a droplet you could
put the code to reset the properties in a run handler. Make the current
value the default answer in the display dialog statement.

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[6/30/01 9:06:40 AM]


  • Prev by Date: Re: Writing without opening (was: Login Applescript won't write to file)
  • Next by Date: Re: Carbon & Applescript 1.5.5
  • Previous by thread: Re: Changing script properties
  • Next by thread: Writing without opening (was: Login Applescript won't write to file)
  • Index(es):
    • Date
    • Thread