24-MAR-2021 Simple Units
|
03-24-2021, 02:17 AM
(This post was last modified: 03-24-2021 06:33 PM by Han.)
Post: #1
|
|||
|
|||
24-MAR-2021 Simple Units
User mode is required. This program basically takes over the [Shift][_] key and provides a super-simple units menu for facilitating unit conversion. When the user types the _ symbol via [Shift][_], a units menu is automatically shown (and if applicable, the last menu used will be displayed). The first menu is the category, and the second menu is the list of units within that category. So if one were to convert 5 kilometers to miles, the keystrokes are:
5 [Shift][_] (select distance) (select km) (press the Sto> menu button on the screen) [Shift][_] (select mile) [Enter] Press [Esc] to traverse back a menu (i.e. from units to category). Escaping out of the category menu will simply place the _ symbol onto the command line (in case you need to type the underscore character inside a string, for example). Pressing [On] will escape all menus (i.e. to avoid pressing [Esc] twice while inside a menu of unit symbols. Adding one's own custom units can be easily done by simply adding to the existing lists named catlist (category) and symlist (unit symbols), which should be fairly obvious to do when looking at the source code (toward the very top). Just make sure to keep the lists ordered properly. To install, simply create a new program called UNITS (or whatever name you want) and copy and paste the code below into your new program (easiest if done via the connectivity kit). Then drag/drop to your calculator. If you already have custom keys set up, then just add this to your existing custom keys program. If you find any typos in the unit symbols, please let me know and I'll update here accordingly. Maybe in the (far?) future I'll focus on creating a custom menu that takes advantage of the large screen so that all categories and unit symbols are visible at once (with keyboard shortcuts) to remove the need to scroll the menu and improve efficiency. Code: #pragma mode( separator(.,;) integer(h32) ) Graph 3D | QPI | SolveSys |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
24-MAR-2021 Simple Units - Han - 03-24-2021 02:17 AM
RE: 23-MAR-2021 Simple Units - spiff72 - 03-24-2021, 02:58 AM
RE: 23-MAR-2021 Simple Units - spiff72 - 03-24-2021, 03:48 AM
RE: 23-MAR-2021 Simple Units - Han - 03-24-2021, 04:04 AM
RE: 23-MAR-2021 Simple Units - spiff72 - 03-24-2021, 04:02 PM
RE: 23-MAR-2021 Simple Units - spiff72 - 03-24-2021, 05:39 PM
RE: 23-MAR-2021 Simple Units - spiff72 - 03-24-2021, 05:50 PM
RE: 23-MAR-2021 Simple Units - Han - 03-24-2021, 06:30 PM
RE: 24-MAR-2021 Simple Units - spiff72 - 03-25-2021, 02:33 AM
RE: 24-MAR-2021 Simple Units - spiff72 - 03-25-2021, 02:42 AM
RE: 24-MAR-2021 Simple Units - Han - 03-25-2021, 03:44 AM
RE: 24-MAR-2021 Simple Units - spiff72 - 03-25-2021, 01:40 PM
|
User(s) browsing this thread: 1 Guest(s)