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

Re: dos/nv/x/z



Quoting Harry Binswanger :
One question: why is PID needed, since the default for GoXy is
to "Focus XyWrite's process"?

I tried the below and it seems to work. Is there some condition
under which it wouldn't?
It would not work if the process title were something other than
"XYWRITE" (case-insensitive). Since I didn't know what title you were
using, I provided more generic procedures (which may come in handy in
any event). If the default works for you, go with it.
Remember, though, that titles can be finicky. The title can change,
depending on the context, e.g. if you shell from XyWrite to DOS. The
hWnd method always works. If (and only if) you run frame MyPID in
STARTUP.INT (recommended), then you can use the following alternate
procedure to grab the hWnd, which is even faster and avoids shelling
to DOS to run MyPID.EXE (since you've already done that in STARTUP.INT):

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5MyhWnd2,MyPID2,MyTitle2}} Return Xy|NB hWnd|Process ID|Ti
tle in S/G50 (and Editor's directory in S/G 51) (run frame My
PID in STARTUP.INT) [CLD][cr|lf]{002}{<}SX49,{<}VA$FR{>}{>}{<
}SV50,2{>}{<}XS49,50,50,51,51{>}{<}SX49,{<}IS50{>}{>}{<}SX50,
{<}VA$ED{>}{>}[JM_]2.GetPath[Q2_]{<}SX51,{<}IS50{>}{>}[BX_]ex
ist {<}PV51{>}\MyPID.DAT[Q2_]{<}IF@not({<}ER{>}){>}{<}LBa{>}{
<}SX50,"{<}VA="+{<}IS51{>}+"\MyPID.DAT,"+{<}IS49{>}+"={>}"{>}
{<}SX50,{<}PV50{>}{>}{<}PR@50{>}{<}EX{>}{<}EI{>}[BX_]exist {<
}PV51{>}\MyPID.EXE[Q2_]{<}IF@NOT({<}ER{>}){>}[BX_]do/nv/x/z {
<}PV51{>}\MyPID.EXE[Q2_]{<}GLa{>}{<}EI{>}{<}SV50,{>}{002}[cr|
lf][cr|lf]
-nd
XPLeNCODE


--
Carl Distefano
cld@xxxxxxxx