• 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
repeat with i from 1 to count items of the selection (9.1)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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!


  • Follow-Ups:
    • Re: repeat with i from 1 to count items of the selection (9.1)
      • From: Emmanuel <email@hidden>
    • Re: repeat with i from 1 to count items of the selection (9.1)
      • From: Jan Pieter Kunst <email@hidden>
  • Prev by Date: Re: load script question
  • Next by Date: loosing variables in a droplet
  • Previous by thread: Re: Carbon & Applescript 1.5.5
  • Next by thread: Re: repeat with i from 1 to count items of the selection (9.1)
  • Index(es):
    • Date
    • Thread