PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: cbudney on December 19, 2018, 02:44:02 PM

Title: Creating Multiline Function Key response
Post by: cbudney on December 19, 2018, 02:44:02 PM
Hello everyone.  Happy Holidays to you all!

I have a customer that we have recently migrated from old environment to pxplus 2018.  They use programmable function keys a lot.   

How would I set a function key like F8 to have a response like Y+'CR'+"N"+'CR'+"HAPPY HOLIDAYS!"+'CR'+'CR'+"PLEASE VISIT OUR WEBSITE!" .... you pretty much get the idea.

Normally I would do something like this for a short response:

PUT FOLLOWING LINE IN STARTUP OR MENU PROGRAM:
DEFCTL (0)$000077$=-60 ! $000077$ is F8

CREATE PROGRAM IN PATH  $CTL-60
0010 REM $CTL-60 - SET 8 TO RELEAS
0020 PREINPUT NEXT "RELEASE"


But I'm not sure how I would get some many responses in one line.  They used to use Facetwin and program the keys a few times a month.

Thanks for your help in advance!

Title: Re: Creating Multiline Function Key response
Post by: James Zukowski on December 19, 2018, 03:05:29 PM
It looks like you've pretty much got it done. You just have to issue a PREINPUT for each line of input.

If you have the users set up the Fkey responses into a file, they can make them pretty much as long as they want. In the command processor program, you just get to read the file, and loop through each line, putting it into the PREINPUT (type-ahead) buffer.

If you set it up as multiple lines, that can go for as many lines as they've defined. If you give them an editable space, you can search for end-of-line, and process each that way.
Title: Re: Creating Multiline Function Key response
Post by: cbudney on December 19, 2018, 03:14:45 PM
Thanks James!!! ;D

I wasn't looking at it the right way!!!!