Hi,
Is there a way to add a mini month calendar to an applescript app? (a mini month calendar is the calendar in the bottom left corner of iCal)
Thanks,
gecko
Hi,
Is there a way to add a mini month calendar to an applescript app? (a mini month calendar is the calendar in the bottom left corner of iCal)
Thanks,
gecko
OK. I got this:
property theMonth : 0
property theYear : 0
on will finish launching theObject
getToday()
updateCal()
end will finish launching
on clicked theObject
if the name of theObject is "up" then
if theMonth is 12 then
set theYear to theYear + 1
set theMonth to 1
else
set theMonth to theMonth + 1
end if
updateCal()
else if the name of theObject is "down" then
if theMonth is 1 then
set theYear to theYear - 1
set theMonth to 12
else
set theMonth to theMonth - 1
end if
updateCal()
else if the name of theObject is "today" then
getToday()
updateCal()
end if
end clicked
on getToday()
set theYear to (year of (current date) as number)
set theMonth to (month of (current date) as number)
end getToday
on updateCal()
set the contents of text field "calendar" of window "main" to do shell script (("cal " & theMonth & " " & theYear) as string)
end updateCal
This uses the shell script cal to get the current month calendar when it launches, and when the up or down buttons are pressed it just changes the month and if necessary the year. It then displays the result of the shell in a text field.
Now I “just” have to be able to click on the days. lol
tiych (thanks if you can help),
gecko
What version of Mac OS X do you have? 10.4 has a (graphical or textual) date picker available.
I had no idea that there could switch the date picker to graphical. That’s exactly what I was looking for! Thanks for saving me from the headache of phrasing the shell script result!
Thanks,
gecko
Browser: Firefox 2.0.0.4
Operating System: Mac OS X (10.4)
I got the app to work anyway. It has a grid of 6x5 buttons that have a day on each of them, you can change months and years, you can jump to today, and when you click on a button in the grid it gives you the complete date. I working on it so that it will soon make waffles. :lol:
Where can I post it on the web, so it is available to be downloaded?
Thanks,
gecko
Browser: Firefox 2.0.0.4
Operating System: Mac OS X (10.4)
Here’s the link to download the program: http://scriptbuilders.net/files/calendar1.0.html Feel free to edit the source code, what it’s using is just an initial version.
gecko