RE: Subroutine difference in script editor and project builder
RE: Subroutine difference in script editor and project builder
- Subject: RE: Subroutine difference in script editor and project builder
- From: "Dan McCann" <email@hidden>
- Date: Thu, 21 Aug 2003 12:33:33 -0700
Jay
I'm not sure what the problem is, but it seems the NS array stuff doesn't
understand "number of items" to find the length of the array. If you ask
for the length using "length" rather than "number of items" the script works
ok:
on ASCII_Sort(my_list)
set the index_list to {}
set the sorted_list to {}
repeat (length of my_list) times
set the low_item to ""
repeat with i from 1 to (length of my_list)
if i is not in the index_list then
set this_item to item i of my_list as text
if the low_item is "" then
set the low_item to this_item
set the low_item_index to i
else if this_item comes before the low_item then
set the low_item to this_item
set the low_item_index to i
end if
end if
end repeat
set the end of sorted_list to the low_item
set the end of the index_list to the low_item_index
end repeat
return the sorted_list
end ASCII_Sort
Regards
Dan
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.