This is a working script to display the calendar:
alias calendar { set %calendar $iif($2,$1-,$asctime(mm yyyy)) tokenize 32 %calendar var %s = $ctime($asctime(01/ $+ $1 $+ / $+ $2 $+ ) 0:00:00) window -aCfk0l20p @Calendar -1 -1 420 480 clear @Calendar drawtext -r @Calendar $inv Fixedsys 25 10 10 $asctime(%s, mmmm yyyy) ;Draw the lines var %line = 60 while (%line <= 420) { drawline -i @Calendar 1 1 0 %line 420 %line drawline -i @Calendar 1 1 %line 60 %line 480 inc %line 60 } ;Fill in day notations var %d = 1 while ($x(%d).1) { drawcal $inv %d 1 $v1 | inc %d } ;Fill in day numbers var %m = $asctime(%s,m), %x, %y = 2 while ($asctime(%s,m) = %m) { %x = $x($asctime(%s,ddd)) drawcal $iif($gettask($asctime(%s,dd/mm/yyyy)),$xor($inv,255), $& $iif($asctime(%s,dd mm) = $asctime(dd mm),$xor($inv,16711680),$inv)) %x %y $asctime(%s,dd) inc %s 86400 if (%x = 7) inc %y } } menu @Calendar { sclick:{ tokenize 32 %calendar var %s = $ctime($asctime(01/ $+ $1 $+ / $+ $2 $+ ) 0:00:00), %a = aline -l @Calendar $+($chr(3),01,$chr(44),00), %d = $& $calc($int($calc(($mouse.x / 60) + 1)) - $x($asctime(%s,ddd)) + 1 + $int($calc(($mouse.y / 60) - 2)) * 7), $& %date = $+($base(%d,10,10,2),/,$base($1,10,10,2),/,$2) !.echo -q $$ctime(%date) clear -l @Calendar %a $+ %date | %a $+ Add Task | %a $+ - var %n = 1 while ($gettask(%date,%n)) { %a $+ $v1 | inc %n } } lbclick:{ if ($1 = 2) { var %task = $$input(Please add a task for this day:,e,Task Add) addtask $strip($line(@Calendar,1,1)) %task aline -l @Calendar $+($chr(3),01,$chr(44),00) $+ %task calendar %calendar } if ($1 > 3) { if ($input(Mark this task as done?,y,Delete?)) { deltask $strip($line(@Calendar,1,1)) $calc($1 - 3) dline -l @Calendar $1 calendar %calendar } } } $submenu($month_menu($1)) } alias -l month return $gettok(January February March April May June July August September October November December,$1,32) alias -l x { var %days = Mon Tue Wed Thu Fri Sat Sun if ($prop) return $gettok(%days,$1,32) else return $findtok(%days,$1,1,32) } alias -l drawcal drawtext -cr @Calendar $1 Fixedsys 30 $calc(($2 - 1) * 60) $calc($3 * 60) 60 60 $4- alias -l month_menu { if ($1 !isnum) return - if ($1 isnum 1-12) { var %m = $iif($calc(($asctime(mm) + $1 - 1) % 12),$v1,12), %y = $calc($asctime(yyyy) + $iif(%m < $asctime(mm),1)) return $month(%m) $chr(40) $+ %y $+ $chr(41) $+ :calendar %m %y } } alias -l inv return $xor($color($color(background)),16777215) ;-- HASH STUFF -- on *:START:{ .hmake Calendar 10 if ($isfile($+(",$scriptdircalendar.hsh,"))) .hload Calendar $+(",$scriptdircalendar.hsh,") if ($gettask($asctime(dd/mm/yyyy))) { beep 10 50 $iif($input(You still have $v1 tasks for today. Open Calendar?,y,Undone Tasks),calendar) } } on *:EXIT:if ($hget(Calendar)) hsave -o Calendar $+(",$scriptdircalendar.hsh,") alias -l gettask { ;$gettask(dd/mm/yyyy,N) var %value = $hget(Calendar,$$1) if (!%value) return if (!$2) return $numtok(%value,32) return $hget(Calendar,$gettok(%value,$2,32)) } alias -l addtask { hinc -m Calendar total hadd -m Calendar $1 $hget(Calendar,$1) $+(id,$hget(Calendar,total)) hadd -m Calendar $+(id,$hget(Calendar,total)) $$2- } alias -l deltask { .hdel Calendar $gettok($hget(Calendar,$1),$2,32) hadd -m Calendar $1 $deltok($hget(Calendar,$1),$2,32) }
This is not my code. I want to remake it so that the months and days are displayed in Spanish. I change this but it doesn't work ...