Roland
Thu Jan 06 03:49:05 CST 2005
"Michel" wrote in message news:eJqzp%23z8EHA.2700@TK2MSFTNGP14.phx.gbl...
: Hello,
:
: Does anybody know how i can get information with VBscript from a window of
: an other program.
: I have a little pice of javascript where it works. But my VB is better
than
: Javascript
:
: The javascript is:
:
: var Running = 0;
: var TE = new ActiveXObject("DAT32COM.TERMINALEMULATION");
: var V = new ActiveXObject("Viewpoint.ViewpointSrv");
: var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
: xmlDoc.async="false"
:
: function Som(Command)
: {
: TE.MakeEntry("<FORMAT>"+Command+"</FORMAT>");
: return(TE.ResponseXML);
: }
:
: function Loep()
: {
: var Response = Som("QCA");
:
: xmlDoc.loadXML(Response);
: nodes=xmlDoc.documentElement.childNodes;
: PCC.innerText=nodes.item(0).text.substring(6,10);
:
: In the row above i get the info from digit 6 to 9.
There may be errors...
dim Running, TE, V xmlDoc
Running = 0
set TE = CreateObject("DAT32COM.TERMINALEMULATION")
set V = CreateObject("Viewpiont.ViewpointSrv")
set xmlDoc = CreateObject("MSXML2.DOMDocument.4.0")
xmlDoc.async = "false"
function Som(Command)
TE.MakeEntry("<FORMAT>" & Command & "</FORMAT>")
Som = TE.ResponseXML)
end function
sub Loep()
dim strResponse, nodes
strResponse = Som("QCA")
xmlDoc.loadXML(Response)
nodes = xmlDoc.documentElement.childNodes
PCC.innerText = mid(nodes.item(0).text,6,4)
end sub
HTH...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp