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

Re: Problem with graphics view...?



** Reply to message from "Patricia M. Godfrey"  on Sat, 03
Jun 2006 15:11:19 -0400


> Xy doesn't know the UNC of
> the PC its running on, does it?

You mean inherently/natively? No. But most people do know their own
machinename! And the names of the machines around them. It never occurred to
me that anyone would want to determine their *own* machinename. Your current
IP address -- yes, certainly, due to DHCP constantly changing your address.
But machine names don't change (unless you change them). Check out HELP
UNC. Xy works perfectly with UNCnames. The only thing Xy4 can't do
natively is a DIR on an UNC machine -- although U2 frame UNC does it nicely,
e.g.:
 UNC/DIR \\PATRICIA\C\XY4

> One can get it through
> a VBScript, save to a textfile, and then read it into a
> Xy pm, but I want to be sure I'm not reinventing the
> wheel (something I'm prone to do).

Well, a much easier way to get it (no script, just do it on the CMline or with
BX ...Q2 ) would be "dos/nv/x/z /c " and then (NT)

 ipconfig.exe /all | find "Host Name" > tmp.tmp
or (9x)
 kmd/c winipcfg.exe /all /batch tmp.tmp&type tmp.tmp | find "Host Name"
>tmp.tmp

then
 CALL tmp.tmp
and parse the machine name off the end of the single line in tmp.tmp. Or do
all the parsing in XyWrite (dump the FIND command) -- probably slightly faster.

On the off chance that this is useful, I've slightly augmented U2 frame GETIP
so that it also does GETHOST. Replace frame GetIP with the following, and then
do GETHOST:

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5GetIP,GetHost}} Get current IPaddress|HostName of local c
omputer OS/2 (GetIP only, requires XyShell)|Win32. S/G 50 Ou
t RJH 6/3/06[cr|lf]{002}{<}SX01,{<}VA$FR{>}{>}[JM_]2.GetXyOS
[Q2_]{<}SX50,{<}VA$ED{>}{>}[JM_]2.GetPath[Q2_]{<}SX50,{<}IS50
{>}+"\GETIP.OUT"{>}{<}SU02,{<}LBA{>}[BX_]exist {<}PV50{>}[Q2_
]{<}IF@NOT({<}ER{>}){>}[BX_]ernv {<}PV50{>}[Q2_][BX_]wait[Q2_
]{<}GLA{>}{<}EI{>}{>}{<}IF{<}VA@652=2{>}{240}"W"{>}{<}GT02{>}
{<}SV03,IPCONFIG.EXE /all >{>}{<}IF{<}VA@652=2{>}{240}"9"@XOR
{<}VA@652=2{>}{240}"ME"{>}{<}SV03,WINIPCFG.EXE /all /batch {>
}{<}EI{>}[BX_]dos/nv/x/z /c {<}PV03{>}{<}PV50{>}[Q2_][BX_]wai
t[Q2_]{<}SV03,IP ADDRESS.{>}{<}IF@UPR({<}IS01{>}){240}"H"{>}{
<}SV03,HOST NAME .{>}{<}EI{>}{<}SX01,{<}IS03{>}+"{027}W: "{>}
{<}LBB{>}[JM_]2.AwaitFile[Q2_]{<}SX50,"04,"+{<}IS50{>}{>}[JM_
]2.SVfile[Q2_]{<}GT02{>}{<}SV06,{013}{>}{<}SV50,{>}{<}LBC{>}{
<}IF@UPR({<}IS04{>}){240}{<}IS03{>}{>}{<}XS04,01,,05,02{>}{<}
XS02,06,05,,04{>}{<}IF{<}IS05{>}<>"0.0.0.0"{>}{<}IF{<}VA|50{>
}>0{>}{<}SX50,{<}IS50{>}+" , "{>}{<}EI{>}{<}SX50,{<}IS50{>}+{
<}IS05{>}{>}{<}EI{>}{<}GLC{>}{<}EI{>}{<}IF{<}VA|50{>}<1{>}{<}
SV50,Not connected to network{>}{<}EI{>}{<}PR@50{>}{<}EX{>}{<
}EI{>}{<}IF{<}VA@652{>}{240}"OS2"{>}{<}GT02{>}{<}SX04,{<}IS50
{>}{>}{<}SV03,HOSTID{>}{<}SV01,= {>}{<}SX50,"HOSTID.EXE >"+{<
}IS50{>}{>}[JM_]2.o2[Q2_]{<}SX50,{<}IS04{>}{>}{<}GLB{>}{<}EI{
{062}}{<}PROS not supported{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------