repeat with i from 1 to count items of the selection (9.1)
repeat with i from 1 to count items of the selection (9.1)
- Subject: repeat with i from 1 to count items of the selection (9.1)
- From: JJ <email@hidden>
- Date: Fri, 29 Jun 2001 09:34:00 +0200
What's up with this routine?
It can work fine or not. If the selection = 1 item,
the script can execute two times and then crashes the system.
I use this script to delete data fork from files, many times per day, and
"repeat with i from 1
", all the day!
I re-compiled it, but the result is the same.
Any known problem? (OS 9.1, applescript 1.5.5)
tell application "Finder"
repeat with i from 1 to count item of the selection
set s to item i of the selection as alias
try
set k to ,
(open fork from s with write access and resource fork)
size fork k to 0
close fork k with flushing
on error
close fork k with flushing
display dialog "There was a problem!" with icon 0
return
end try
display dialog "It's done!" with icon 1
end repeat
end tell
JJ
* Now starts an OS-9.1-applescript-questions-rain over you!