[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Capturing keystrokes [not anthrax]



Reply to note from Jay McNally  Thu, 01 Nov 2001
08:27:18 -0500

> Is there a way to capture text from the command line?
>
> I am well-versed on save gets, keyboards and lots of xpl, but
> have never figured out to get a command (like a complicated
> search) into memory for a save-get.

The basic procedure is to create, and then execute, a SUbroutine
that captures the current contents of the command line (CMline)
using Save/Get 00. A SUb is required because  has a dual
role. At the outset of a program, it inserts the argument, if any,
passed along with the RUN command. But inside a SUb, it captures
whatever is on the CMline at the moment  is executed.

Thus, the following captures the CMline to X:

>>

A more generalized routine that solicits a key from the user would
look like this ("{240}" means Ascii-240):

)>;*;
==1&"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"{240}>;*;
+",>>">;*;


The Jumbo U2 has a thorough routine, CMLINE, that will capture any
CMline to Save/Get 616. You can assign it to a key with:

nn=JM2,.,c,m,l,i,n,e,Q2

To retrieve a CMline so captured, issue GT 616.

--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/