habe noch ein kleines Problem dann glabe ich das ich ohne weiteres etwas alleine machen kann"glaube ich "
zeile 93 - 103 ich mache ein Ping test soweit so gut würde aber gerne den label namen änder $status
Online oder Offline und die Farbe rot oder Grün ist das machbar ?
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=d:\eyup\entwicklung\09-05-09.kxf
$Form1 = GUICreate("Helper", 884, 523, 204, 127)
GUISetIcon("D:\005.ico")
GUICtrlCreateTab(16, 48, 820, 432)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$Tabsheet1 = GUICtrlCreateTabItem("Remote")
$Verbinden = GUICtrlCreateButton("Verbinden", 736, 104, 97, 33, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$STATUS = GUICtrlCreateButton("STATUS", 736, 72, 97, 33, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x00FF00)
$VNC = GUICtrlCreateButton("VNC", 736, 136, 99, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$RemoteAssitance = GUICtrlCreateButton("RemoteAssitance", 736, 160, 99, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$RDP = GUICtrlCreateButton("RDP", 736, 184, 97, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$C = GUICtrlCreateButton("C", 736, 208, 99, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Button1 = GUICtrlCreateButton("Button1", 736, 232, 99, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$cnameinput = GUICtrlCreateInput("", 24, 98, 121, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$macinput = GUICtrlCreateInput("", 184, -78, 129, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Computername = GUICtrlCreateLabel("Computername", 184, -166, 96, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$IP = GUICtrlCreateLabel("IP", 184, -54, 12, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$MAC = GUICtrlCreateLabel("MAC", 184, -94, 27, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$userinput = GUICtrlCreateInput("", 184, -117, 121, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Username = GUICtrlCreateLabel("Username", 184, -133, 53, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$IPAddress1 = _GUICtrlIpAddress_Create($Form1, 184, -37, 122, 21)
_GUICtrlIpAddress_Set($IPAddress1, "0.0.0.0")
$Input1 = GUICtrlCreateInput("", 26, 175, 129,22 )
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Label1 = GUICtrlCreateLabel("Computername", 26, 79, 96, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("MAC", 26, 159, 27, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input2 = GUICtrlCreateInput("", 26, 136, 121, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Label4 = GUICtrlCreateLabel("Username", 26, 120, 53, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$RCMD = GUICtrlCreateButton("RCMD", 736, 256, 99, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$RemoteReg = GUICtrlCreateButton("RemoteReg", 736, 280, 99, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Admin = GUICtrlCreateTabItem("Admin")
$Rollout = GUICtrlCreateTabItem("Rollout")
$OnlineCheck = GUICtrlCreateTabItem("OnlineCheck")
$List1 = GUICtrlCreateList("", 32, 128, 121, 305)
$ListeLaden = GUICtrlCreateButton("ListeLaden", 32, 448, 123, 25, 0)
$Computerliste = GUICtrlCreateLabel("Computerliste", 32, 104, 67, 17)
$List2 = GUICtrlCreateList("", 168, 128, 121, 305)
$ExportOnline = GUICtrlCreateButton("ExportOnline", 168, 448, 123, 25, 0)
$Online = GUICtrlCreateLabel("Online", 168, 104, 34, 17)
$List3 = GUICtrlCreateList("", 304, 128, 121, 305)
$ExportOffline = GUICtrlCreateButton("ExportOffline", 304, 448, 123, 25, 0)
$Offline = GUICtrlCreateLabel("Offline", 304, 104, 34, 17)
$Check = GUICtrlCreateButton("Check", 32, 80, 123, 25, 0)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $VNC
Run(@ComSpec & " /c " & 'vnc\vncstart.bat ' & GUICtrlRead($cnameinput), "", @SW_HIDE)
case $c
Run(@ComSpec & " /c " & 'explorer\rmc.bat ' & GUICtrlRead($cnameinput), "", @SW_HIDE)
case $RemoteAssitance
Run(@ComSpec & " /c " & 'vnc\remass.bat ' & GUICtrlRead($cnameinput), "", @SW_HIDE)
case $RemoteReg
Run(@ComSpec & " /c " & 'remote\remoteregxp.exe ' & GUICtrlRead($cnameinput), "", @SW_HIDE)
case $ListeLaden
FileOpenDialog("Öffnen", "C:\", "Text Dateien (*.txt)| Excel (*.csv)| Text Dateien(*.txt)")
Case $Verbinden
;Vorherrige abfrage mit Ping online ist = 0
$var = Ping("" & GUICtrlRead($cnameinput) & "",250)
If $var Then ; also possible: If @error = 0 Then ...
Msgbox(0,"Status"," " & GUICtrlRead($cnameinput) & " ist Online " )
Else
Msgbox(0,"Status"," " & GUICtrlRead($cnameinput) & " ist Offline " )
EndIf
$var = RegRead("\\" & GUICtrlRead($cnameinput) & "\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon", "Defaultusername")
GUICtrlSetData($input2, $var)
EndSwitch
WEnd