Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Xeda112358 on January 10, 2013, 12:17:18 am

Title: MenuKey
Post by: Xeda112358 on January 10, 2013, 12:17:18 am
A while ago I made a rather neat program that could let you access menu items even after you have left the menu. What do I mean by this? If you set the Strings menu as your menu to access, you can press ON+[number] anywhere in the OS to paste the string. You can use other menus as well, but the Apps and PRGM menu won't work for this. This should help anybody who wants to add a new element of efficiency to their on-calc coding :P
Title: Re: MenuKey
Post by: TIfanx1999 on January 10, 2013, 01:04:33 am
This is pretty neat Xeda! :D
Title: Re: MenuKey
Post by: shmibs on January 10, 2013, 01:11:20 am
now that i think about it, you should get thepenguin to stick an incarnation of this in zstart. that way, people wouldn't be put off by other hooks being overwritten, and it would probably be very popular.
Title: Re: MenuKey
Post by: DrDnar on January 10, 2013, 04:08:33 am
Omnicalc already had a similar feature, but it only worked with tokens from the Catalog menu, probably due to hooks.

On a tangentially related note, I've bugged thepenguin about putting Omnicalc functionality into zStart, but he won't.
Title: Re: MenuKey
Post by: Xeda112358 on January 10, 2013, 10:27:53 am
It basically sets a keyhook that check when you press ON+Vars. Then, it records the menu that you are in and whenever you press ON+number, it selects the menu item by writing to a few bytes of RAM.
Title: Re: MenuKey
Post by: Matrefeytontias on January 10, 2013, 12:24:39 pm
I wondered, are you using a getCSC hook or a getKey hook ? In any case, how are you testing the ON key ?
Title: Re: MenuKey
Post by: thepenguin77 on January 10, 2013, 02:53:40 pm
now that i think about it, you should get thepenguin to stick an incarnation of this in zstart. that way, people wouldn't be put off by other hooks being overwritten, and it would probably be very popular.

I could do it yes, but I don't know how I would do it and not mess up any of the current hooks (when I do that, people get angry).

You could do this (though not as nicely) by simply setting shortcuts for an entire menu in chronological order.
Title: Re: MenuKey
Post by: Xeda112358 on January 10, 2013, 03:21:22 pm
I wondered, are you using a getCSC hook or a getKey hook ? In any case, how are you testing the ON key ?
getCSC hook is what I am using. To test the ON key:
Code: [Select]
     in a,(4)
     and 8
     ret nz        ;means ON is not being pressed
<<ON is being pressed, so do stuff>>
Title: Re: MenuKey
Post by: Deep Toaster on January 10, 2013, 03:44:45 pm
I've never thought of that being a way to speed up coding, but now that I think about it, I can imagine it being pretty useful (especially with the PRGM command menus). That's pretty neat!
Omnicalc already had a similar feature, but it only worked with tokens from the Catalog menu, probably due to hooks.
Didn't Omnicalc only create a custom menu of catalog commands? To be honest, what I think would be really useful is a combination of the two—creating a custom menu of difficult catalog commands (like the six string commands that don't show up anywhere else), and then having an ON+# shortcut to access them without opening the custom menu.
Title: Re: MenuKey
Post by: Xeda112358 on January 10, 2013, 03:50:07 pm
That would be rather cool o.o And yeah, that is all I remember Omnicalc having, I'm not sure which feature DrDnar is referring to .__.
Title: Re: MenuKey
Post by: Sorunome on January 10, 2013, 05:37:44 pm
Sounds nice, only too bad it wouldn't work with zstart >.<