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

Use ENTER instead of helpkey



A year ago, Carl developed a frame, $X, that allows activating U2 frames
with the Enter key, rather than needing a separate, assigned . I
modified tinkered with, and customized Carl's code. In accordance with
HBPPP (Holmgren Best Practices Programming Protocol) I left Carl's frame
($X) alone and named my version $H. (Note there is already a frame named
$H, so make needed adjustments if you use this.)
Now after a year of use, I regard such a program (in whichever version) as
a can't-do-without. After installing it, there's no longer a distinction,
for the user, between a native command, such as TYpe and a U2 "command,"
such as DOW (gives the current Day Of the Week). You just put TY or DOW on
the command line and hit Enter.

I'm including both Carl's original and my tinkered-with version.

Carl's $X:

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5$X-10/10/08}} Issue COMMAND[ arg(s)] or U2_FRAMENA
ME[ arg(s)] with a single key [CLD rev.10/10/08][cr|
lf]{002}{<}SX01,{<}IS00{>}{>}{<}IF{<}VA$KC{>}==28!{<}VA$KC{>}
==104{>}{<}IF{<}VA$SM{>}>0{>}[JM_]2.null[Q2_]{<}EI{>}{<}IF{<}
VA$TX{>}>0&{<}VA$WS{>}<2{>}[255+048+068]{<}EX{>}{<}EI{>}{<}EI
{>}{<}IF{<}VA!620{>}<1&{<}VA|01{>}>0{>}[JM_]2.$S[Q2_]{<}EI{>}
{<}IF{<}IS01{>}=="?"!{<}VA|01{>}>1&"HELP"{238}@upr({<}IS01{>}
)<>0{>}{<}SX02,{<}VA$EB{>}{>}{<}SX03,{<}VAWA{>}{>}[BX_]d wa=0
[Q2_]{<}SX02,"[BX_]es 1[Q2_][BX_]d eb="+{<}IS02{>}+"[Q2_]"{>}
{<}SX03,"[BX_]d wa="+{<}IS03{>}+"[Q2_]"{>}{<}IF"D EB"{238}@up
r({<}IS01{>})==0!"DEFAULT EB"{238}@upr({<}IS01{>})==0!"D $EB"
{238}@upr({<}IS01{>})==0!"DEFAULT $EB"{238}@upr({<}IS01{>})==
0!"VA/NV EB"{238}@upr({<}IS01{>})==0!"VA/NV $EB"{238}@upr({<}
IS01{>})==0{>}{<}SV02,[BX_]es 1[Q2_]{>}{<}EI{>}{<}IF"D WA"{23
8}@upr({<}IS01{>})==0!"DEFAULT WA"{238}@upr({<}IS01{>})==0{>}
{<}SV03,{>}{<}EI{>}{<}IF{<}VA|02{>}>10{>}[BX_]d eb=0,0[Q2_]{<
}EI{>}{<}IF"VA/NV WA"{238}@upr({<}IS01{>})==0{>}{<}PV03{>}{<}
SV03,{>}{<}EI{>}{<}IF{<}VA$WS{>}==2&{<}VA$TX{>}==1{>}[BC_]ca[
XC_]{<}EX{>}{<}EI{>}[XC_];*;[cr|lf]{<}IF@not({<}ER{>})!{<}VA$
ER{>}<>12{>}{<}PV02{>}{<}PV03{>}{<}EX{>}{<}EI{>}[BX_]wait[Q2_
]{<}PV02{>}{<}PV03{>}{<}EI{>}{<}SV01,{>}{<}IF{<}VA$MG{>}<>""{
{062}}{<}SX01,{<}VA$MG{>}{>}{<}EI{>}{<}PR@01{>}[BX_]es[Q2_][JM_]2
{046}PrsCMline[Q2_]{002}[cr|lf]
-nd
XPLeNCODE

My $H:

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5$H}} Issue COMMAND[ arg(s)] or U2_FRAMENAME[ arg(s
)] with a single key. HB modification of CLD rev.9/2
9/08. NB: assumes Setting.dfl has df WA=0. And 'hbcd' is my f
rame for Changing Directories[cr|lf]{002}{<}IF{<}VA$TX{>}>0{>
}[255+048+068]{<}EX{>}{<}EI{>};*;[cr|lf]{<}SX91,{<}IS00{>}{>}
;*;[cr|lf]{<}SX90,"[BX_]es 1[Q2_][BX_]d eb=768,20000[Q2_][BX_
]es[Q2_]"{>};*; reset EB (while es is off)[cr|lf]{<}IF"D EB"{
238}@upr({<}IS91{>})==0{>}{<}PRTo change EB, change U2 frame{032}
$H{>}{<}EX{>}{<}EI{>};*;[cr|lf];*;{<}IF"VA/NV EB"{238}@upr({<
}IS91{>})==0{>}[XC_]{<}EX{>}{<}EI{>};*;[cr|lf][BX_]d eb=0,0[Q
2_];*; [cr|lf]{<}SV92,HELP {>};*;[cr|lf]{<}IF{<}IS92{>}{238}@
upr({<}IS91{>})==0{>}{<}XS91,92,92,,50{>};*; put argument of{032}
HELP in 50[cr|lf][JM_]2.HELP[Q2_]{<}PV90{>}{<}EX{>}{<}EI{>};*
; get help and exit[cr|lf][XC_];*; XC for most cases: i.e., U
2 call, Xy internal command, or hbcd[cr|lf]{<}IF@not({<}ER{>}
){>}{<}PV90{>}{<}EX{>}{<}EI{>};*; did native cmd fine; reset{032}
& exit[cr|lf][BX_]wait[Q2_]{<}IF{<}VA$ER{>}<>12{>};*; some re
gular Xy cmd executed but gave error[cr|lf]{<}SX91,{<}VA$ER{>
}{>}{<}PR\@91{>}{<}PV90{>}[BX_]beep[Q2_]{<}EX{>}{<}EI{>};*; s
tore msg first; prompt message, reset, allow beep, beep, exit
[cr|lf];*; below here, wasn't a native Xy cmd, so either U2,{032}
hbcd or nonsense[cr|lf][JM_]2.PrsCMline[Q2_];*; try doing it{032}
as a U2 call[cr|lf]{<}IF{<}VA$ER{>}>1351{>}[JM_]2.hbcd[Q2_]{<
}EI{>};*; try doing it as hbcd call[cr|lf]{<}PV90{>}{<}SV90,{
{062}}{<}SV91,{>}{<}SV92,{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE
And here is a de minimis frame enables you to use ctrl-S to save, regardless of whether the file is a U2 file (in use) or not. Another thing you don't have to think about.

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5hbsa}} For ctrl-s: if file is the U2, will call LoadHelp{032}
[HB 11/03/08][cr|lf]{002}{<}IF@Upr({<}VA$FI{>})=="XYWWWEB.U2"
{>}[JM_]2.LH[Q2_]{<}EX{>}{<}EI{>}[GT_][255+048+068][BD_][BX_]
sa[Q2_]{<}IF@NOT({<}ER{>}){>}{<}PRSaved{>}{<}EX{>}{<}EI{>}{<}
PRError{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE



Harry Binswanger
hb@xxxxxxxx