• 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
Script property scope in folder action scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Script property scope in folder action scripts


  • Subject: Script property scope in folder action scripts
  • From: "Marc K. Myers" <email@hidden>
  • Date: Wed, 26 Sep 2001 13:51:50 -0400
  • Organization: [very little]

I'm writing a folder action script that uses a file alias stored in a
script property. Theoretically, I should be asked to fill in this value
only the first time the script is run. Instead I'm asked ever time. It
is as though the folder action handler can't see the property or the
property doesn't persist from execution to execution. Here's the
relevant code snippet:

property logFile : missing value

on adding folder items to theFldr after receiving theItems
try
alias (logFile as text)
on error
set logFile to (choose file with prompt "Please locate the log file:")
end try
end adding folder items to

Can anyone tell me why the property doesn't "take"? I'm running AS 1.6
under OS 9.2.1. Thanks in advance for any light on the subject.

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

[9/26/01 1:50:48 PM]


  • Follow-Ups:
    • Re: Script property scope in folder action scripts
      • From: "AppleScripter" <email@hidden>
  • Prev by Date: List of error codes
  • Next by Date: Re: Where is the Missing Link?.
  • Previous by thread: Re: List of error codes
  • Next by thread: Re: Script property scope in folder action scripts
  • Index(es):
    • Date
    • Thread