set the_month to month of (current date) as integer
set the_year to year of (current date) as integer
set the_cal to (my get_cal(the_month, the_year)) --return my get_cal(“”, the_year) --leave month empty for full year
set the_days to word -1 of the_cal
return {the_month:the_month, the_year:the_year, the_days:the_days, the_cal:the_cal}
on get_cal(the_month, the_year)
return (do shell script "cal " & the_month & " " & the_year)
end get_cal
witch results in
{the_month:1, the_year:2013, the_days:“31”, the_cal:" January 2013
Su Mo Tu We Th Fr Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
"}
being in the result box and i would like to be able to then get it to the clipboard.
i tried
set the_month to month of (current date) as integer
set the_year to year of (current date) as integer
set the_cal to (my get_cal(the_month, the_year)) --return my get_cal(“”, the_year) --leave month empty for full year
set the_days to word -1 of the_cal
return {the_month:the_month, the_year:the_year, the_days:the_days, the_cal:the_cal}
on get_cal(the_month, the_year)
set temp1 to (do shell script "cal " & the_month & " " & the_year)
end get_cal
tell application “finder”
set clipboard to temp1 as text
end tell
and i get errors or nothing happens.
i am looking for a way to generate calendars with clickable cells that go to web sites.
the clipboard is one of the rare expressions where the article is required
tell (current date) to set {the_year, the_month} to {year as text, its month as integer as text} -- for the shell script better coerce to text
set the_cal to get_cal(the_month, the_year) --return get_cal("", the_year) --leave month empty for full year
set the clipboard to the_cal
set the_days to word -1 of the_cal
return {the_month:the_month, the_year:the_year, the_days:the_days, the_cal:the_cal}
on get_cal(the_month, the_year)
set temp1 to (do shell script "cal " & the_month & " " & the_year)
end get_cal