Post Reply 
How to run apps in different directory?
10-13-2014, 04:44 AM
Post: #5
RE: How to run apps in different directory?
(10-13-2014 04:11 AM)ohitsanazn Wrote:  This solution works, but is there a way to change the label of the soft key?

From the 50g Users Manual, page 20-4:
Quote:Menu specification and CST variable

... the most general menu specification list includes a number of sub-lists equal to the number of items to be displayed in your custom menu. Each sub-list contains a label for the menu key followed by a function, expression, label, or other object that constitutes the effect of the menu key when pressed. ...

... in RPN mode, the argument list has this format
{“label1”, function1, ls1, rs1}, {“label2”, function2, ls2, rs2},…}

In these specifications, function1, function 2, etc., represent the main operation of the key, while ls1, ls2, …, etc., represent the left-shift operation of the key.

Similarly, rs1, rs2, …, etc., represent the right-shift operation of the key. This list will be stored in variable CST if command MENU is used. You can have a different CST variable in each sub-directory, and you can always replace the current contents of CST with those of other variables storing the properly formatted list to produce another custom menu.

So, yes, you can change the label simply by changing the string in the appropriate position of the list shown above ("label1", "label2", etc.).

For example, if you wanted your custom menu to include two items ("foo" and "bar"), each of which executed different programs in the /UTILS/TGL subdirectory of your calculator, you might do something like the following:

Code:
{
   { "foo" << PATH { HOME UTILS TGL PROG1 } EVAL EVAL >> }
   { "bar" << PATH { HOME UTILS TGL PROG2 } EVAL EVAL >> }
}
MENU
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to run apps in different directory? - DavidM - 10-13-2014 04:44 AM



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