• 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
When are properties set?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

When are properties set?


  • Subject: When are properties set?
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 4 Sep 2008 15:09:04 -0500

I wrote this quickie AppleScript application, only to find that it didn't behave as expected.

property defaultDelayMin : 10 -- minutes

on run
repeat
display dialog "Set time out minutes to ..." default answer defaultDelayMin
try
set delayMin to (text returned of the result) as number
exit repeat
end try
end repeat
set defaultDelayMin to delayMin
display dialog defaultDelayMin -- diagnostic, confirm that 'defaultDelayMin' has been changed
delay (delayMin * 60) -- seconds
tell application "Finder" to beep
end run

The diagnostic line reports the correct value and if the script is allowed to run to the beep, the default value for the next run is the value entered on the previous run.

But what happens if I force quit the application while it's doing the 'delay'?

The diagnostic line reports that the value of 'defaultDelayMin' has been changed, but on the next run, I find that the value has not been changed.

I can't explain this, but no doubt someone can.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: When are properties set?
      • From: Ian Goos <email@hidden>
  • Prev by Date: Re: Version control and AppleScript
  • Next by Date: Re: Version control and AppleScript
  • Previous by thread: Re: Version control and AppleScript
  • Next by thread: Re: When are properties set?
  • Index(es):
    • Date
    • Thread