Post Reply 
50g: Create directory-like GROB for custom menus
01-24-2023, 11:17 PM
Post: #1
50g: Create directory-like GROB for custom menus
Here I would like to share with you a very small program that I use to make my custom menus look more like the default ones in the calculator.
I called it CRDIM, as in CReate Directory IMage.

WHAT THE PROGRAM DOES:
When you start the program, it will ask for a 0 to 5 letters directory name; after inserting said name, it will convert it to a GROB and then add it to a custom-made GROB of a folder. When it is finished, it will leave the final GROB on the 2st level of the stack (to visually check if the program did what we wanted it to do), and the same GROB converted to string on the 1st level.

To use the resulting GROB on a custom menu, copy the string on the 1st level and insert it as the label of custom menu key.

EXAMPLE:
I want to make a custom menu that has a sub-menu that lets me access the default functions DUP OVER DROP; the sub-menu has to be reachable via the custom menu key "SUBMN".
I will start the CRDIM program and, when asked, i will enter the SUBMN string; on the stack I will find the GROB on the second level and the string of said GROB on the first level (in this case, the string is GROB 21 8 E30000FFFFF1359591D55151B59151755551919551FFFFF1). I will then EDIT the string (press the down-arrow) and copy it. Then, I will create the list used for the custom menu:
Code:
{{GROB 21 8 E30000FFFFF1359591D55151B59151755551919551FFFFF1 \<< {DUP OVER DROP} TMENU \>>}} MENU

THE PROGRAM:
Code:
\<< "Enter 1 to 5-letter name of
directory" "" INPUT 
1.00000E0 \->GROB @ minifont GROB
GROB 21 8 E30000FFFFF1FFFFF1FFFFF1FFFFF1FFFFF1FFFFF1FFFFF1 @ 21x8 GROB of a blank directory
SWAP { # 1h # 2h } @ text position inside directory GROB
SWAP GXOR @ final GROB created
DUP \->STR @ create a copy and convert it to string for ease of copy
\>> CRDIM STO
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
50g: Create directory-like GROB for custom menus - Matteo C. - 01-24-2023 11:17 PM



User(s) browsing this thread: 1 Guest(s)