Post Reply 
How to run apps in different directory?
10-13-2014, 04:11 AM
Post: #4
RE: How to run apps in different directory?
(10-13-2014 03:20 AM)DavidM Wrote:  
(10-13-2014 02:30 AM)ohitsanazn Wrote:  Is it possible?

I want to stick all of my custom made "toggle" apps in a folder, but still be able to run them from the CUSTOM menu. Is there some sort of PATH (like on Windows and Linux) I can add the apps folder too?

I'm assuming you're asking about the 50g since you've asked other questions about that calculator recently.

While there's no PATH-like variable designated for the RPL systems, there is a default behavior defined where the operating system will generally search in the current directory and work upwards through each parent when it attempts to find a referenced global variable (aka. user-stored object). As such, the only location that you could store all of your toggle apps for universal access is in the HOME directory (since that would be found from any location). Items stored in the HOME directory will usually be found simply by using their name as a reference, regardless of which directory the calculator is currently browsing.

That's probably not what you had in mind, but there's several other options (some more advanced than others). Perhaps the easiest would be to store them in preferred location (eg. UTILS / TGL), then in the code for your CUSTOM menu you would simply run the program by placing its name prefaced by the parent directories in braces, then executing with EVAL as follows:

Code:
{ HOME UTILS TGL PROG1 } EVAL
(which of course assumes an executable object with the name "PROG1" in the /UTILS/TGL/ directory)

Note that, when using this method, the current directory is changed to the one containing the referenced object. So you may want to take that into account in your code (see the PATH command).

This solution works, but is there a way to change the label of the soft key?

50g | 48g+ | 38g
Former TI user -- still need to bust out the 84 on tests though
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? - ohitsanazn - 10-13-2014 04:11 AM



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