Re: List oddity
Re: List oddity
- Subject: Re: List oddity
- From: Stan Cleveland <email@hidden>
- Date: Mon, 02 Aug 2010 19:05:25 -0700
On Aug 2, 2010, at 6:37 PM, Michelle Steiner wrote:
>>> You must be on Snow Leopard. An explicit "get" will help:
>>>
>>> set weekString to (get {item startMonth of mnths, startDay, "‹", item endMonth
>> of mnths, endDay}) as text
>>
>>
>> Hmmm, Not on Snow Leopard. Here at work I'm on 10.4
>>
>> Tried with 'get' no joy. I'll try it on SL at home.
>
> Doesn't help with SL either.
Hi Michelle,
Did you put parentheses around the "get"? I do get the error without them.
Otherwise, I wonder why it works OMM? I'm running 10.6.4 on an Intel Macbook Pro. There are no scripting additions loaded and I've re-verified that the script works. (Two different dialog boxes pop up, both saying "Aug. 8 < 15".) Below is the code again, as it is OMM. Am I overlooking something?
Stan C.
property mnths : {"Jan.", "Feb.", "March", "April", "May", "June", "July", "Aug.", "Sept.", "Oct.", "Nov.", "Dec."}
set rightNow to (current date)
set dayOWeek to weekday of rightNow as integer
set daysToSun to 8 - dayOWeek
set startDate to rightNow + daysToSun * days
set startMonth to month of startDate as integer
set startDay to day of startDate
set endDate to startDate + 7 * days
set endMonth to month of endDate as integer
set endDay to day of endDate
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {" "}
if endMonth is not startMonth then
set weekString to (get {item startMonth of mnths, startDay, "‹", item endMonth of mnths, endDay}) as text
else
set weekString to (get {item startMonth of mnths, startDay, "‹", endDay}) as text
end if
display dialog weekString
if endMonth is not startMonth then
set weekString to (get {item startMonth of mnths, startDay, "‹", item endMonth of mnths, endDay}) as text
else
set weekString to (get {item startMonth of mnths, startDay, "‹", endDay}) as text
end if
set AppleScript's text item delimiters to oldDelims
--set weekString to weekString as text
display dialog weekString
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden