Code archives/BlitzPlus Gui/IP Updater

This code has been declared by its author to be Public Domain code.

Download source code

IP Updater by B+man
(Posted 23 years ago)
Ok, it may not be ground breaking, but I made this so I can quickly get my IP address and copy and paste it... I have apache installed and I'm on dial-up... That's why I think it's so damn handy!!!

And it's my first Blitz+ proggy :D
;IP Updater
;Coded By Dabhand 2004

IPwindow = CreateWindow("IP Updater",0,0,200,120,0,9)

windowX = ClientWidth(IPwindow)
ButtGadgetX = 104
IPtxtGadgetX = 100
IPlabelGadgetX = 106

n = CountHostIPs("") 
ip = HostIP(1) 
ipaddress$ = DottedIP$(ip)


IPlabel = CreateLabel("LOCAL IP ADDRESS",(windowX/2)-(IPlabelGadgetX/2),0,106,20,IPwindow,0)
IPtxtbox = CreateTextField((windowX/2)-(IPtxtGadgetX/2),20,100,20,IPwindow)
IPRefreshButton = CreateButton("REFRESH",(windowX/2)-(ButtGadgetX/2),45,104,20,IPwindow) 

n = CountHostIPs("") 
ip = HostIP(1) 
ipaddress$ = DottedIP$(ip)

SetStatusText IPwindow,"Created By Dabz 2004" 

SetGadgetText IPtxtbox,ipaddress$

Repeat
id=WaitEvent() 
 
If ID=$803 
	End 	
End If

If ID=$401 Then 						
		If EventSource()=IPRefreshButton	
			n = CountHostIPs("") 
			ip = HostIP(1) 
			ipaddress$ = DottedIP$(ip)
			SetGadgetText IPtxtbox,ipaddress$	
		End If
End If 

Forever
End