HP Forums

Full Version: current app?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This may have been answered, but is there a provision to detect the current app name?

It would be useful in a program to be able to remember the current app, possibly interact with other apps then on return restart the previous current app, leaving the machine as found. (An app variable that holds the app name).

Thanks,
-Dale-
Han did a similar trick on his Contour plot.....check it out.
He goes into Advance Graphing app copy the original variables that existed, does his contour plots then put the original variables back after his plot.
Bonjour
Personnellement, je créer une Avars("Active"):="nom de l'application" pour chaque application.
Je peux savoir dans mes programmes quelle est l'application active et événtuellement la mémoriser.

Hello
Personally, I create an Avars ("Active"): = "application name" for each application.
I can know in my programs what the active application and eventually memorize it.
I understand your approach, but I'm not sure how to best implement it:

1. AVars("Active") don't persist after a calculator reset, do they?

2. Do you, "manually," create an associated AVars("Active") at the command entry line, for every single app, and again after every reset? (Maybe making a program to manage a list of app "Active" names, would be useful here).

3. Ideally, an interactive way to look into the system and discover the current active app, like a System Variable, is what I'm after. Something similar to "Programs." I haven't found anything like that for the current app, does it exist?
Quote:1. AVars("Active") don't persist after a calculator reset, do they?
Je n'ai pas testé, pas de problème entrainant une réinitialisation depuis longtemps,
mais il y a de fortes chances que tout soit perdu.
On peut imaginer une sauvegarde avec les applications de base et leur Avars("Active"), pour les applications personnelles pas de problème ceci est dans la sauvegarde.

I have not tested, no problem causing a reset,
But there's a good chance that everything will be lost.
One can imagine a backup with basic applications and their Avars ("Active"), for personal applications no problem this is in backup.

Quote: Do you, "manually," create an associated AVars("Active") at the command entry line, for every single app
Oui
Yes

Quote:It would be useful in a program to be able to remember the current app, possibly interact with other apps then on return restart the previous current app, leaving the machine as found. (An app variable that holds the app name).

C'était un peu l'objet de mon post récent : "Application présente", l'avez-vous lu ?
It was a bit the object of my recent post: "Application present", have you read it?
Voici un programme qui pourrait être utile pour plusieurs
AVars à réinitialiser.

Here is a program that could be useful for several
AVars to reset.
Code:
EXPORT APPINIT()
BEGIN
 LOCAL listap:={},v:="Active";
 LOCAL i,r,c;
 FOR i FROM 252 TO 256 DO
  listap(0):=STRINGFROMID(i);
 END;
 FOR i FROM 407 TO 417 DO
  listap(0):=STRINGFROMID(i);
 END;
 listap(0):=STRINGFROMID(1446);
 listap(0):=STRINGFROMID(1734);
 r:=CHOOSE(c,"APPLINIT",listap);
 IF r THEN
  EXPR(listap(c)+".AVars("+STRING(v)+"):="+STRING(listap(c)));
 END;
END;
STRINGFROMID devrait permettre de fonctionner dans tous les langages.
On peut réinistialiser une application depuis une autre, il est surement possible d'en faire
une version utilisable en sous-programme.
Qu'en pensez-vous ?

STRINGFROMID should make it possible to work in all languages.
One can reinitialize one application from another, it is surely possible to make one
A version that can be used as a subroutine.
What do you think ?
That's very good, Tyann!
Create a START() program for your app. This is what is run any time an app is started (i.e. when switching to a new app). In the START() program, initialize all that you need to be initialize. This takes care of resets. You can also insert a call to START() in each of your "main" app routines (e.g. the Plot replacement, for example) to ensure that everything is initialized properly.
Reference URL's