Page 1 of 1

Field Exit key does not seem to work with the presskey() method.

Posted: Mon Mar 02, 2015 11:25 am
by rmarsh
I am trying to create a button that will field exit then enter. If you enter wihout field exit the code entered will not be found unless it is long enough to fill the entire field. In 5250 it is a 8 character input field that must be right justified. On green screen you type the code, press field exit then enter.

Re: Field Exit key does not seem to work with the presskey() method.

Posted: Mon Mar 02, 2015 12:35 pm
by rmarsh
I ended up doing this. Combining some advice from a js guy with what little I know of Genie.

Code: Select all

pui.set("I_4_21", ("     " + get(I_4_21)).slice(-9));
presskey("Enter");
Anyway, this works. I would like to know if there is a way to use presskey with "Field exit". I tried several variations on "Field Exit" with no success.

Re: Field Exit key does not seem to work with the presskey() method.

Posted: Mon Mar 02, 2015 3:38 pm
by Scott Klement
How about:

Code: Select all

pui.fieldExit();
pressKey("Enter");
That assumes the cursor is already where you want it to be when you hit field exit...