I'm needing some assistance.
I have a gui, that we use to help manage our computers and network stuff.
i have radio buttons working that when selected, they pull data from text files, then i'm able to execute functions such as ping, and opening up a remote mmc to that pc ect ect
I'm trying to add a new gui button($editradio), that when pressed (depending on which radio button is pressed) will open up the text file that goes with that radio button.
here is my code (I've left allot of stuff out, and only put in what i felt is needed to help me accomplish this)
#Region ###Remote push###
$TabSheet1 = GUICtrlCreateTabItem("Remote Push")
$Group1 = GUICtrlCreateGroup(" ", 18, 55, 180, 505, $WS_BORDER, $WS_EX_CLIENTEDGE)
$Radio1 = GUICtrlCreateRadio("firstfloor", 25, 69, 113, 30)
$Radio2 = GUICtrlCreateRadio("2ndfloor", 25, 98, 113, 30)
$Group2 = GUICtrlCreateGroup(" ", 200, 56, 697, 641, $WS_BORDER, $WS_EX_CLIENTEDGE)
$Label1 = GUICtrlCreateLabel("Computer", 216, 69, 233, 25)
$input1 = GUICtrlCreateCombo("", 216, 92, 233, 25, BitOR($CBS_DROPDOWN, $WS_VSCROLL))
$PINGHOST = GUICtrlCreateButton("Ping", 216, 122, 91, 57)
$MMC = GUICtrlCreateButton("Remote" & @CRLF & "MMC", 455, 122, 91, 57, $bs_multiline)
$editradio = GUICtrlCreateButton("edit" & @CRLF & "list", 455, 415, 91, 57, $bs_multiline)
GUICtrlCreateTabItem("")
GUISetState(@SW_MAXIMIZE)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
#Region ###REMOTEPUSH###
Case $Radio1
GUICtrlSetData($input1, "")
$Readcityhall = FileRead("\\server1\scripts\1stfloor.txt")
GUICtrlSetData($input1, StringReplace($Readcityhall, @CRLF, "|"),1)
Case $Radio2
GUICtrlSetData($input1, "")
$Readcityhall = FileRead("\\server1\scripts\2ndfloor.txt")
GUICtrlSetData($input1, StringReplace($Readcityhall, @CRLF, "|"),1)
#EndRegion ###Remote push###
Case $PINGHOST
$pc = GUICtrlRead($input1)
Run(@ComSpec & ' /k ' & 'ping ' & $pc & ' -t')
Case $MMC
$pc = GUICtrlRead($input1)
Run(@ComSpec & ' /c ' & 'compmgmt.msc /computer:\\' & $pc, "", @SW_HIDE)
Case $editradio
If GUICtrlRead($radio1) _IsPressed Then
shellExecute("\\server1\scripts\1stfloor.txt")
Else
ElseIf