Post by garry » 30 Jun 2020, 14:19
LAN oder WLAN , ein einfaches GUI , fragt nur nach a_ipaddress1 , evtl gilt nur für mein PC
wenn nichts angezeigt wird > kein Internet
Wäre dieses Beispiel ok ?
siehe :
Code: Select all
;- WLAN or LAN
;- run, %comspec% /k Netsh wlan show networks mode=bssid ;- zeigt alle WLAN's an
;run, %ComSpec% /k ipconfig
;msgbox,%a_ipaddress1% ;- << IPv4-Adresse
#warn
#NoEnv
SetWorkingDir, %A_ScriptDir%
wa:=A_screenwidth,ha:=A_screenHeight,xx:=100
Gui,2: -DPIScale
c1=D4D0C8 ;- gray normal msgbox
Gui,2: Color, Black,%c1% ;- Gui color / background from Edit
Gui,2: Font,cYellow s14 ,Lucida Console ;- font , font-size and color
;----------------
x:=(wa*1)/xx,y1:=(ha*2)/xx,y2:=(ha*5)/xx
gui,2: add, text, x%x% y%y1% , LAN =
gui,2: add, text, x%x% y%y2% , WLAN =
;----------------
x:=(wa*6)/xx,w:=(wa*8)/xx,h:=(ha*2.6)/xx
gui,2: add, edit, x%x% y%y1% h%h% w%w% vLAN readonly right ,
gui,2: add, edit, x%x% y%y2% h%h% w%w% vWLAN readonly right ,
;----------------
x:=(wa*7)/xx,y:=(ha*1)/xx,w:=(wa*17)/xx,h:=(ha*17)/xx
gui,2: show ,x%x% y%y% w%w% h%h%,LAN or WLAN IPv4-Address
;----------------
Gui,2: add,text,x0 y0 h0 w0 vT1
GuiControl,2:Focus,T1
settimer,aas,1000
return
;------------------------
2Guiclose:
exitapp
;------------------------
Aas:
acx:=a_ipaddress1
GuiControl,2:,LAN
GuiControl,2:,WLAN
if (acx="192.168.1.113")
GuiControl,2:,LAN,%acx%
if (acx="192.168.1.114")
GuiControl,2:,WLAN,%acx%
return
;==========================================
LAN oder WLAN , ein einfaches GUI , fragt nur nach a_ipaddress1 , evtl gilt nur für mein PC
wenn nichts angezeigt wird > kein Internet
Wäre dieses Beispiel ok ?
siehe :
[code]run, %ComSpec% /k ipconfig[/code]
[code]
;- WLAN or LAN
;- run, %comspec% /k Netsh wlan show networks mode=bssid ;- zeigt alle WLAN's an
;run, %ComSpec% /k ipconfig
;msgbox,%a_ipaddress1% ;- << IPv4-Adresse
#warn
#NoEnv
SetWorkingDir, %A_ScriptDir%
wa:=A_screenwidth,ha:=A_screenHeight,xx:=100
Gui,2: -DPIScale
c1=D4D0C8 ;- gray normal msgbox
Gui,2: Color, Black,%c1% ;- Gui color / background from Edit
Gui,2: Font,cYellow s14 ,Lucida Console ;- font , font-size and color
;----------------
x:=(wa*1)/xx,y1:=(ha*2)/xx,y2:=(ha*5)/xx
gui,2: add, text, x%x% y%y1% , LAN =
gui,2: add, text, x%x% y%y2% , WLAN =
;----------------
x:=(wa*6)/xx,w:=(wa*8)/xx,h:=(ha*2.6)/xx
gui,2: add, edit, x%x% y%y1% h%h% w%w% vLAN readonly right ,
gui,2: add, edit, x%x% y%y2% h%h% w%w% vWLAN readonly right ,
;----------------
x:=(wa*7)/xx,y:=(ha*1)/xx,w:=(wa*17)/xx,h:=(ha*17)/xx
gui,2: show ,x%x% y%y% w%w% h%h%,LAN or WLAN IPv4-Address
;----------------
Gui,2: add,text,x0 y0 h0 w0 vT1
GuiControl,2:Focus,T1
settimer,aas,1000
return
;------------------------
2Guiclose:
exitapp
;------------------------
Aas:
acx:=a_ipaddress1
GuiControl,2:,LAN
GuiControl,2:,WLAN
if (acx="192.168.1.113")
GuiControl,2:,LAN,%acx%
if (acx="192.168.1.114")
GuiControl,2:,WLAN,%acx%
return
;==========================================
[/code]