Re: repeat with i from 1 to count items of the selection (9.1)
Re: repeat with i from 1 to count items of the selection (9.1)
- Subject: Re: repeat with i from 1 to count items of the selection (9.1)
- From: Jan Pieter Kunst <email@hidden>
- Date: Fri, 29 Jun 2001 15:50:33 +0200
JJ (email@hidden) schreef op 29-06-2001 09:34 :
>
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)
I don't know if this has anything to do with it, but I found that if I want
to do something with selected files it is usually more reliable to set some
variable to "the selection" and continue with i to count of items of that
variable, instead of directly working with the selection. The selection
might change while the script is running, the count items changes with it,
and things go wrong with the loop. If you have the initial selection fixed
in some list variable that can't happen.
JP