Re: Picking your brains about dates and times
Re: Picking your brains about dates and times
- Subject: Re: Picking your brains about dates and times
- From: Shane Stanley <email@hidden>
- Date: Fri, 05 Feb 2016 15:38:52 +1100
On 3 Feb 2016, at 1:09 PM, Stockly, Ed <email@hidden> wrote:
>
> Before I go about reinventing this wheel, has anyone done this kind of
> thing in AppleScript before?
Yes, I did something similar ages ago -- it was building cinema session-time listings. There were a lot of other quirks to do with classifications and NFT, and it had to be put in pages.
From what I can remember, the basic process I used was first to make separate lists for each day, with records having a title, and session times in order. First pass I'd get the first film on day 1, and build a list of where I had matches, and how many, for each subsequent day. You use that to build your range strings for sessions that repeat; you need some logic on how you prioritise. Then you remove those session times from your data. Repeat down the list, then down the days.
Then in a second pass I'd build the remaining list of one-day only sessions, and append them to the strings above.
I remember it took a fair time to run; I resorted to a progress dialog. Have fun...
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
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