Re: [ANN]AppleMods on Citizen Strange
Re: [ANN]AppleMods on Citizen Strange
- Subject: Re: [ANN]AppleMods on Citizen Strange
- From: Arthur J Knapp <email@hidden>
- Date: Thu, 07 Jun 2001 11:13:34 -0400
>
Date: Wed, 06 Jun 2001 22:19:49 -0500
>
Subject: [ANN]AppleMods on Citizen Strange
>
From: Greg Strange <email@hidden>
>
<http://applemods.citizenstrange.com>
>
>
A place where scripters can post code and hopefully get code to do all kinds
>
of things. There are only a few scripts there right now, but I am hoping
>
the Arthur Knapps, Paul Berkowitzs, Bill Cheesemans and Hans Haeslers of the
>
applescript community might start sharing their handlers and script snippets
>
with the rest of us so that the AppleScript community might become stronger.
Some of the Arthur Knapps of the world are currently trying to get out
from under a mountain of work... :)
Here is my first contribution:
(* Have you ever wondered how you would reverse a list
* if AppleScript lists didn't have a reverse property?
*
* You haven't??? There may be something wrong with you. ;-)
*)
on reverseList(lst)
repeat with x from 1 to ((lst's length) div 2)
set {lst's item x, lst's item -x} to {lst's item -x, lst's item x}
end repeat
end reverseList
set aList to {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
reverseList(aList)
aList
-- > {9, 8, 7, 6, 5, 4, 3, 2, 1, 0}
>
Greg Strange
I sense an impending competition between Mr. Strange and Mr. MacScripter.com
;-)
P.S. I notice that the Nigel Garveys and Shane Stanleys of the world
were not mentioned... ;-)
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://www.seanet.com/~jonpugh/