HP Forums
A simple Entry Mode Switcher... - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: HP Prime Software Library (/forum-15.html)
+--- Thread: A simple Entry Mode Switcher... (/thread-801.html)



A simple Entry Mode Switcher... - Cristóbal De Jesús - 03-01-2014 10:55 PM

... with visual feedback. Probably the simplest program so far, it's a key definition.
Code:
// Cycles over entry mode options. 
KEY K_On() 
BEGIN 
LOCAL an:={"Textbook","Algebraic","RPN"}; 
Entry:=(Entry+1)MOD3; 

STARTVIEW(-8,1); // Out to ANY AVAILABLE view... 
STARTVIEW(-1,1); // ... and back in, to refresh 

TEXTOUT_P(an(Entry+1),G0,2,207,2,RGB(255,0,0)); 
END;



RE: A simple Entry Mode Switcher... - rprosperi - 03-02-2014 03:12 AM

Very simple.
VERY useful.
VERY NICE!

Thanks for sharing.


RE: A simple Entry Mode Switcher... - CR Haeger - 03-02-2014 10:19 PM

+1 nice job!


RE: A simple Entry Mode Switcher... - Eddie W. Shore - 05-09-2014 01:13 PM

+2 Simple and powerful - well done


RE: A simple Entry Mode Switcher... - darwin513 - 05-10-2014 05:16 AM

How do you run this? I'm new to running HP Prime programs.
Thanks!


RE: A simple Entry Mode Switcher... - Cristóbal De Jesús - 05-11-2014 12:21 AM

(05-10-2014 05:16 AM)darwin513 Wrote:  How do you run this? I'm new to running HP Prime programs.
Thanks!

Once you have copied the program in the Program Catalog, activate the user keyboard by pressing SHIFT HELP ("1U" will be displayed when activated), then press the customized key, ON in this case. More info: User Guide page 516. Easy as π.


RE: A simple Entry Mode Switcher... - darwin513 - 05-14-2014 02:17 AM

(05-11-2014 12:21 AM)Cristóbal De Jesús Wrote:  
(05-10-2014 05:16 AM)darwin513 Wrote:  How do you run this? I'm new to running HP Prime programs.
Thanks!

Once you have copied the program in the Program Catalog, activate the user keyboard by pressing SHIFT HELP ("1U" will be displayed when activated), then press the customized key, ON in this case. More info: User Guide page 516. Easy as π.


Got it working, thank you!


RE: A simple Entry Mode Switcher... - Cristóbal De Jesús - 05-04-2016 06:27 AM

Meaner, leaner, tighter (and works with the latest firmware)...
Code:

// Cycles over entry mode options. 
 KEY K_On() 
 BEGIN 
 LOCAL an:={"Textbook","Algebraic","RPN"}; 
 Entry:=(Entry+1) MOD 3; 

 STARTVIEW(-1,1); // Refresh Home view BEFORE tagging...

 TEXTOUT_P(an(Entry+1),G0,2,207,2,RGB(255,0,0));
 FREEZE; // the mean part!
 END;



RE: A simple Entry Mode Switcher... - Spybot - 05-04-2016 04:34 PM

Thank you very much Cristobal, still very useful.


RE: A simple Entry Mode Switcher... - Tyann - 05-05-2016 11:11 AM

Bonjour
C'est une excellente idée, si je peut proposer une petite
amélioration ?
Pour les différentes langues disponibles.

Hello
It's a great idea, if I may offer a small
improvement ?
For the available languages ​​.

Code:

KEY K_On()
BEGIN
Entry:=(Entry+1) MOD 3;
STARTVIEW(-1,1);
TEXTOUT_P(STRINGFROMID(1903+Entry),G0,2,207,2,RGB(255,0,0));
FREEZE;
END;



RE: A simple Entry Mode Switcher... - rprosperi - 05-05-2016 01:50 PM

(05-05-2016 11:11 AM)Tyann Wrote:  
Code:

KEY K_On()
BEGIN
Entry:=(Entry+1) MOD 3;
STARTVIEW(-1,1);
TEXTOUT_P(STRINGFROMID(1903+Entry),G0,2,207,2,RGB(255,0,0));
FREEZE;
END;

Your English is fine and your code is clever!


RE: A simple Entry Mode Switcher... - Cristóbal De Jesús - 05-06-2016 03:12 PM

(05-05-2016 11:11 AM)Tyann Wrote:  Bonjour
C'est une excellente idée, si je peut proposer une petite
amélioration ?
Pour les différentes langues disponibles.

Hello
It's a great idea, if I may offer a small
improvement ?
For the available languages ​​.

Code:

KEY K_On()
BEGIN
Entry:=(Entry+1) MOD 3;
STARTVIEW(-1,1);
TEXTOUT_P(STRINGFROMID(1903+Entry),G0,2,207,2,RGB(255,0,0));
FREEZE;
END;

Great! Thanks for the improvement, I learned something new today.


RE: A simple Entry Mode Switcher... - dae - 07-27-2019 10:26 PM

Here is a popup version.
It will fill in based on the user's preferred language.

Code:

//Popup selection of Entry method
// To run: Shift:Help:On
// String in language of user

Key K_On
BEGIN
  LOCAL epick, title, entry1, entry2, entry3;
  title     := STRINGFROMID(1902); //"Choose entry method"
  entry1 := STRINGFROMID(1903); //"Textbook"
  entry2 := STRINGFROMID(1904); //"Algebraic"
  entry3 := STRINGFROMID(1905); //"RPN"
  CHOOSE(epick,title, entry1, entry2, entry3);
  Entry := epick - 1;
END;