local lcTempFile, loWSH, lcLocalIP lcTempFile="LocalIP.txt" if file(lcTempfile) &&erase leftovers from old run erase (lcTempFile) endif loWSH=CreateObject("Wscript.Shell") loWSH.run("command /c ipconfig > "+lcTempfile,0,1) if file(lcTempFile) &&read the file and parse it lcLocalIP=upper(filetostr(lcTempFile)) lcLocalIP=substr(lcLocalIP, at('IP ADDRESS',lcLocalIP)) lcLocalIP=substr(lcLocalIP, at(':',lcLocalIP)+2) lcLocalIP=substr(lcLocalIP, 1, at(chr(13),lcLocalIP)-1) messagebox(lcLocalIP) endifor
PUBLIC IPSocket crlf=CHR(13)+CHR(10) IPSocket = CREATEOBJECT("MSWinsock.Winsock") IF TYPE('IPSocket')='O' IPAddress = IPSocket.LocalIP localhostname=IPSocket.localhostname remotehost=IPSocket.remotehost remotehostip=IPSocket.remotehostip MESSAGEBOX ("Local IP = " + IPAddress+crlf+"local host = "+localhostname; +crlf+"Remotehost = "+remotehost+crlf+"Remotehostip = "+remotehostip) ELSE MESSAGEBOX('Unable to determine IP Address') ENDIF>how to know the IP addres of the box.