Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: IP Address
Option #2:
;98/08/04 John Henry Miller ;jhmiller@mindless.com ;Script to keep checking (looping) looking for my IP Address ;Once IP Address is established, it is displayed in a window and script is terminated. AddExtender("WWWSK34I.DLL") host="ftp.execpc.com" :Start GoSub GetIpAddress If IpAddress!=0 ;IpAddress!=0 then we are on Internet so let's tell the world and quit looking. Message("Now on Internet!", "My IP Address is %IpAddress%") Exit Else ;IpAddress==0 then we are not yet on Internet, so don't do anything but keep looking. EndIf ;Put in a little delay to free up CPU time. TimeDelay(5) GoTo Start :GetIpAddress :ConnectToHost ;Get the Ip Address for this machine by opening and connecting a socket to a known host. talksocket=sOpen() status=sConnect(talksocket,"%host%","ftp") ;This is where we get the IpAdress with the Socket number. IpAddress=wxGetInfo(1,talksocket) ;Find the colon which is the charecter used to ;parse the Ip Adress from the Socket Number. colon= StrIndex(IpAddress, ":", 0, @FWDSCAN)-1 ;Strip off the Socket Number. IpAddress=StrSub(IpAddress, 1, colon) ;All done with this Socket sClose(talksocket) Return
Article ID: W13797
Filename: Simple Script to Find My IP Address.txt
File Created: 2001:03:01:12:25:04
Last Updated: 2001:03:01:12:25:04