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

Re:



Reply to note from Harry Binswanger  Tue, 07 Sep
2010 11:49:18 -0400

Harry:

> I'm trying to work with func RK to record a series of
> keystrokes, then LDRK to s/g 1 (not 01). I'm getting baffling
> response:  has the right value but a test with 
> fails.

The reason for the failure is that LDRK, like LDPM, saves keystrokes
as live XPL code (as you'd expect for a macro recorder), not as an
inert string. To perform a string equivalency test in your example,
you first have to resave the contents of S/G 1 as a string, with
>. Here's the corrected code (when prompted, input
"abcdx"):

XPLeNCODE v2.0
b-gin [UNTITLED]
{<}SV1,{>};*;[cr|lf]{<}LBA{>};*; LOOP [cr|lf][BC_]--hit any k
ey (x = exit);*;[cr|lf][RK_];*; start recording keystrokes[cr
|lf]{<}LBb{>};*;[cr|lf]{<}IF{<}RC{>}=="x"{>}{<}GLc{>}{<}EI{>}
;*; here I enter "abcd" then an x to exit[cr|lf]{<}GLb{>};*;
[cr|lf]{<}LBc{>};*;[cr|lf][RK_];*;[cr|lf][BX_]ldrk 1[Q2_]{<}S
X1,{<}IS1{>}{>};*;[cr|lf]{<}IF{<}IS1{>}=="abcdx"{>}[BC_]YES!{
<}EX{>}{<}EI{>};*;[cr|lf][BC_]{<}PR@1{>}{<}EX{>}[cr|lf]
-nd
XPLeNCODE

As to , it reads the first character or function in a key
assignment and allows the rest to execute. Compare , which reads
the first char or func in the key assignment and discards the rest.

--
Carl Distefano
cld@xxxxxxxx