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

Re: When are properties set?


  • Subject: Re: When are properties set?
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 4 Sep 2008 17:33:51 -0500

No. I need to clarify this.
The script was saved as an uneditable application bundle ... so I didn't edit it.


On Sep 4, 2008, at 4:46 PM, Ian Goos wrote:

Hey Luther,
I think the property resets to what you typed because you reopened the script in Script Editor. Danny Goodman describes this as a squirrly subject in his AppleScript Handbook. The property retains changes when compiled and left alone in the application (or script file) but reverts to the initial value when reopened and modified in Script Editor. I suspect it's because the script has both a compiled segment and a user text segment in the file/application.



Cheers! Ian

On Sep 4, 2008, at 4:09 PM, Luther Fuller wrote:

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


_______________________________________________ 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: Stan Cleveland <email@hidden>
References: 
 >When are properties set? (From: Luther Fuller <email@hidden>)
 >Re: When are properties set? (From: Ian Goos <email@hidden>)

  • Prev by Date: Re: When are properties set?
  • Next by Date: Re: When are properties set?
  • Previous by thread: Re: When are properties set?
  • Next by thread: Re: When are properties set?
  • Index(es):
    • Date
    • Thread