Re: Script property scope in folder action scripts
Re: Script property scope in folder action scripts
- Subject: Re: Script property scope in folder action scripts
- From: "Marc K. Myers" <email@hidden>
- Date: Wed, 26 Sep 2001 15:28:19 -0400
- Organization: [very little]
>
Date: Wed, 26 Sep 2001 13:51:50 -0400
>
From: "Marc K. Myers" <email@hidden>
>
Reply-To: email@hidden
>
Organization: [very little]
>
To: applescript-users <email@hidden>
>
Subject: Script property scope in folder action scripts
>
>
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.
My bad!
I found that the snippet worked, whereas the whole script didn't. That
lead me to find that I'd used an "activate" command which the backgroud
task that runs folder actions didn't like. Once I pulled that out it
worked fine.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[9/26/01 3:27:31 PM]