?Tried Convert Script on encoded script in msg 2 of digest, Vol 2 #388, but...
?Tried Convert Script on encoded script in msg 2 of digest, Vol 2 #388, but...
- Subject: ?Tried Convert Script on encoded script in msg 2 of digest, Vol 2 #388, but...
- From: Bill Christens-Barry <email@hidden>
- Date: Sat, 17 Feb 2001 16:47:49 -0500
I decided to try out Convert Script 1.0d2 on the following
preprocessed script in msg 2 of the digest of Vol 2 #388:
Message: 2
From: email@hidden
Date: Sat, 17 Feb 2001 10:25:18 EST
Subject: Re: File Syncronizing
To: email@hidden
Thanks Chris for your response. It's gotten me off to a good start, but I'm
still having trouble with a couple aspects (questions at the end of the two
posted scripts). First, here's the original script that does work so you can
see what I want to do. This script works correctly, but is very slow:
-- ---------------------------------------------------------
-- Preprocessed by Convert Script 1.0d2
-- ---------------------------------------------------------
tell application "Finder"
set theCurrentProfiles to (every file of folder "Jupiter:Ken:Profile
Distribution:Profiles")
set theLocalSysFold to system folder as alias
set theLocalSysFold to theLocalSysFold & "ColorSync Profiles:" as text
set theLocalProfiles to (every file of folder theLocalSysFold)
repeat with thisProfile in theLocalProfiles
try
if modification date of thisProfile is not (modification date of
file ("Jupiter:Ken:Profile Distribution:Profiles:" & (name of thisProfile)))
then
delete thisProfile
end if
on error
delete thisProfile
end try
end repeat
set profilesToAdd to {}
repeat with thisProfile in theCurrentProfiles
if not (exists file (theLocalSysFold & (name of thisProfile))) then
set profilesToAdd to profilesToAdd & thisProfile
end if
end repeat
duplicate profilesToAdd to system folder
end tell
-- ---------------------------------------------------------
What I did was copy the script code and then run Convert Script 1.0d2
from the OSA menu. Then I pasted back into ScriptEditor. There, I
noticed that the line break before the 'then' command fragment, that
was present before processing, was still there after processing.
Have I misunderstood Convert Script's intended scope? Is this kind of
email-imposed line break not handled by the encoding side? Did the
line break arise after the encoding, and if so, is this an event that
Convert Script is not intended to deal with? In any case,
ScriptEditor gags on it without further repair.
What to do?
c-b
...........................................................
.........*..................................*...........
......*......Bill Christens-Barry.....*......
.....*............................................*.....
......*email@hidden.......*.......
.........*..................................*...........
...........................................................