Re: Accessing a Record by variable--the solutions
Re: Accessing a Record by variable--the solutions
- Subject: Re: Accessing a Record by variable--the solutions
- From: "Arthur J Knapp" <email@hidden>
- Date: Fri, 16 Feb 2001 09:56:20 -0500
>
Subject: Re: Accessing a Record by variable--the solutions
>
Date: Thu, 15 Feb 2001 15:14:39 -0800
>
From: Michelle Steiner <email@hidden>
>
> Now, who can modify this basic technique just enough to work with
>
property kStrMonths :
>
"...JanjanFebfebMarmarApraprMaymayJunjunJuljulAugaugSepsepOctoctNovnovDecde
>
c"
>
>
on monthIndex(mon)
>
set the calculation to (offset of mon in kStrMonths) div 3
>
if (ASCII number of character 1 of mon) is greater than 90 then
>
return the calculation div 2
>
else
>
return the calculation div 2 + 1
>
end if
>
end monthIndex
>
>
set theMonth to "jul"
>
monthIndex(theMonth)
>
>
-->7
And there we have it. :)
>
--michelle
Yet another winner of the imaginary Obfusticated AppleScript
contest. ;-)
--
{
Arthur J Knapp, of STELLARViSIONs ;
http://www.STELLARViSIONs.com ;
mailto:email@hidden ;
"...well the rain falls down
without my help, I'm afraid
and my lawn gets wet,
though I withheld my consent..."
}