This program can output a graphical calendar based off of the year and month that you enter. Also, the screenie appears slow for some reason. It runs a lot faster on my regular calculator though...
PS: If you type in 0 for the month, the program will automatically show the current month.
Here is a screenie of it in action at the normal speed(although it runs a lot faster on a real calculator for some reason...):
EDIT: Here are some new pictures that have been separated into two different examples with realigned borders between the digits.(Thanks tifreak)
Custom month and year
Current month and year
So what do you guys think?
Looks nice, however you should fix the line and text spacing so it doesn't overwrite the lines with the text.
Thanks for the suggestion. I especially need to fix that penultimate row. If anyone has any other ideas on how to make the program better, please post them. Thanks.
Centering the number: Text(R,C-2(N>9),N should work.
The N>9 statement returns with 1 if true and 0 if false right? If not, can you please explain and then I'll add it.
kpa4941 wrote:
The N>9 statement returns with 1 if true and 0 if false right? If not, can you please explain and then I'll add it.
N values >9 contain 2 digits, and <=9 contain 1 digit. Weregoose's code moves your text 2 pixels backwards if N is two digits. Digits are four pixels wide, so this will keep your text centered.
That's what it does. If the number has two digits, it shifts it left by two.
Are you using a picture variable for this? I think I can write some code for you that would reduce the draw time.
I drew the picture out with lines and pixels and then saved it as a pic using StorePic and RecallPic.
Nice modified screenshots! A small suggestion: Indicate the box with the current day in the current month view, perhaps with inversion, or an inner box, or something?
An excellent idea. How would I make the colors inverted though?
kpa4941 wrote:
An excellent idea. How would I make the colors inverted though?
Run a two-nested-loop iteration of the Pxl-Change() command.
Code: For(A,X1,X2
For(B,Y1,Y2
Pxl-Change(B,A
End
End
Needs another End.
How would I define the cubed out area that the program inverts the pixels? Also, can you please help me out with the for loops. I am confused as to how they will work in this situation.
For() loops increment a variable from {start} to {end} by {increment}. They loop the code within their block until the variable's value reaches {end}
The syntax is as follows:
For({variable},{start},{end},{increment}
//code
End
I understand how for loops work, I just don't understand how I will be able to implement the for loop in this situtation. How do I specify which pixels to change for the square that marks today's date?
You can do it when placing the numbers. If the number just placed equals today's date, enter a loop that changes all of its pixels.
But how do I make such a loop that changes all of those pixels in a defined area?
Code: ClrHome
For(R,2,7
For(C,2,15
Output(R,C,"X
End
End
Extrapolate. Your other tool is Pxl-Change(.
Use the same coordinates that were used to place the number of today's date.
souvik1997 wrote:
Needs another End.
Whoops, that's what I get for not proofreading my posts before mashing submit.
As Weregoose says, since you put Text() in each square, you know roughly the pixel coordinates of each square. You'll need to loop from some X to X+10ish, and Y to Y+6ish. Of course, your text is down and to the right of the top-left corner of each cell, so you'll have to offset those ranges by a bit.