In this case, I want to display the current month with today highlighted.  As I was trying to get my head round writing this in a program using the qHTM.dll (to include HTML in an autohotkey GUI), the calendar will be in a HTML-autohotkey mixed code.  Obviously just omit the HTML rubbish if you want to create a calendar using just autohotkey syntax.

Actually, the following code is an excerpt from my program which checks an online server (for IT Events during this month) and if it can't download the calendar, it had to display an offline version in the GUI.  To display the following code in this website though, I've had to omit a lot of the HTML part.

This is the code in full; apologies for the mess coding but it's a mix between HTML and autohotkey syntax (note we're making a table with 9 columns and 6 rows - there's a spacing column on either side):

htmlText:=""
htmlText:=htmlText "<table>"
htmlText:=htmlText "<tr>"
htmlText:=htmlText "	<td><img src='" A_ScriptDir "\images\s.gif' width='15' height='1' /></td>"
htmlText:=htmlText "    	<td><font color='#cccccc'>M</font></td>"
htmlText:=htmlText "    	<td><font color='#cccccc'>T</font></td>"
htmlText:=htmlText "    	<td><font color='#cccccc'>W</font></td>"
htmlText:=htmlText "    	<td><font color='#cccccc'>T</font></td>"
htmlText:=htmlText "    	<td><font color='#cccccc'>F</font></td>"
htmlText:=htmlText "    	<td><font color='#cccccc'>S</font></td>"
htmlText:=htmlText "    	<td><font color='#cccccc'>S</font></td>"
htmlText:=htmlText "    	<td><img src='" A_ScriptDir "\images\s.gif' width='10' height='1' /></td>"
htmlText:=htmlText "</tr>"

; GET NUMBER OF DAYS THIS MONTH
; Haven't found anyone who calculates how many days there are in a month so this is a crude solution
; This checks if this year is a leap year
Check1:=Mod(A_YYYY,4)
Check2:=Mod(A_YYYY,100)
Check3:=Mod(A_YYYY,400)
if (Check1=0) AND (((Check2=0)and(Check3=0)) OR (Check20))
	DaysInMonth=31,29,31,30,31,30,31,31,30,31,30,31
else
	DaysInMonth=31,28,31,30,31,30,31,31,30,31,30,31
ThisMonthNum:=A_MM * 1	; because we want 01 to equal 1
ThisDateNum:=A_DD * 1	; because we want 01 to equal 1
StringSplit, DaysPerMonth, DaysInMonth, `,
DaysInThisMonth:=DaysPerMonth%ThisMonthNum%

; get the first day-of-week of this month
FormatTime, firstDayBlankNum, %A_YYYY%%A_MM%1, WDay

; add blank spaces in front of this first day
dateToDisplay:=1
If (firstDayBlankNum

Easy-peasy hey???