smedley89
Members-
Posts
11 -
Joined
-
Last visited
smedley89's Achievements
Seeker (1/7)
0
Reputation
-
Ah, ok. Again, thanks a whole bunch folks! You guys rock!
-
With Windows 7, all is exactly as it should be. With XP, it comes up as false whether there's a network connection or not. Any ideas? #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=wi0064-64.ico #AutoIt3Wrapper_Outfile=IP Change.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; OS: XP, Windows 7 ; Author: Ken Stillings ; #include ;declaring the variables needed for user input Global $IP = "" Global $SN = "" Global $GW = "" Global $Error = "" ;creating the GUI and related buttons GUICreate("CBE IP Change", 260, 460) GuiCtrlCreateLabel(" (Click to set for ASA)", 5, 15, 125, 30) $ASAButton = GUICtrlCreateButton("ASA", 135, 5, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Sets IP to" & @cr &"192.168.31.200"& @cr &"255.255.255.0"& @cr &"192.168.31.31") GuiCtrlCreateLabel(" (Click to set for SFC)", 5, 50, 125, 30) $SFCButton = GUICtrlCreateButton("SFC", 135,40, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Sets IP to" & @cr & "169.254.196.200"& @cr &"255.255.255.0") GuiCtrlCreateLabel("(Click to set for 3xLOGIC)", 5, 85, 125, 30) $3XButton = GUICtrlCreateButton("3xLOGIC", 135,75, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Sets IP to"& @cr & "10.1.1.250"& @cr &"255.255.255.0") GuiCtrlCreateLabel(" (Click to set Custom IP)", 5, 120, 125, 30) $CUSTButton = GUICtrlCreateButton("Custom", 135,110, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "This button allows you to enter"& @cr & "your own IP information") GuiCtrlCreateLabel("(Click to set for Standard)", 5, 155, 125, 30) $STDButton = GUICtrlCreateButton("Standard", 135,145, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Restores your IP to DHCP which"& @cr &"pulls the IP from the router") GuiCtrlCreateLabel(" (Click to ping Sapphire)", 5, 190, 125, 30) $PNGSapphire = GUICtrlCreateButton("Sapphire", 135,180, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Pings the Sapphire"& @cr &"IP 192.168.31.11") GuiCtrlCreateLabel(" (Click to ping HPV-20)", 5, 225, 125, 30) $PNGhpv = GUICtrlCreateButton("HPV-20", 135,215, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Pings the HPV-20"& @cr &"IP 192.168.31.1") GuiCtrlCreateLabel(" (Click to ping Router)", 5, 260, 125, 30) $PNGrouter = GUICtrlCreateButton("ROUTER", 135,250, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Pings the router at "& @cr &"IP 192.168.31.31") GuiCtrlCreateLabel("(Run IPCONFIG /Release)", 5, 295, 130, 30) $IPrelease = GUICtrlCreateButton("/RELEASE", 135,285, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Runs the"& @cr &"IPCONFIG /release command") GuiCtrlCreateLabel(" (Run IPCONFIG /Renew)", 5, 330, 125, 30) $IPrenew = GUICtrlCreateButton("/RENEW", 135,320, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Runs the"& @cr &"IPCONFIG /renew command") GuiCtrlCreateLabel(" (Run IPCONFIG /All)", 5, 365, 125, 30) $IPall = GUICtrlCreateButton("/ALL", 135,355, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Runs the IPCONFIG /ALL"& @cr &"command, showing current"& @cr &"IP configuration") GuiCtrlCreateLabel("(Run RubyCommOptions)", 5, 400, 125, 30) $IPrco = GUICtrlCreateButton("RubyCommOptions", 135,390, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Calls up the RubyCommOptions program") $EXITButton = GUICtrlCreateButton("Exit", 135,425, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "This button exits the program") ; GUI MESSAGE LOOP GuiSetState() If not _IsInternetConnected() Then $answer = MsgBox(0, "Error", "Please make sure your network cable is connected, then restart IP Change.") Exit EndIf While 1 $msg = GUIGetMsg() Select Case $msg = $ASAButton Run ('C:\Windows\System32\netsh.exe') sleep (1000) send ('interface IP set address name="Local Area Connection" source=static 192.168.31.200 255.255.255.0 192.168.31.31 1+{enter}') sleep (1000) send ('exit+{enter}') sleep (1000) $answer = MsgBox(0, "IP Address", "Your IP address is set.") Case $msg = $SFCButton Run ('C:\Windows\System32\netsh.exe') sleep (1000) send ('interface ip set address name="Local Area Connection" source=static 169.254.196.200 255.255.255.0+{enter}') sleep (1000) send ('exit+{enter}') sleep (1000) $answer = MsgBox(0, "IP Address", "Your IP address is set.") Case $msg = $3xButton Run ('C:\Windows\System32\netsh.exe') sleep (1000) send ('interface ip set address name="Local Area Connection" source=static 10.1.1.250 255.255.255.0+{enter}') sleep (1000) send ('exit+{enter}') sleep (1000) $answer = MsgBox(0, "IP Address", "Your IP address is set.") Case $msg = $STDButton Run ('C:\Windows\System32\netsh.exe') sleep (1000) send ('interface ip set dns name="Local Area Connection" source=DHCP+{enter}') sleep (1000) send ('interface ip set wins name="Local Area Connection" source=DHCP+{enter}') sleep (1000) send ('interface ip set address name="Local Area Connection" source=DHCP+{enter}') sleep (1000) send ('exit+{enter}') sleep (500) $answer = MsgBox(0, "IP Address", "Your IP address is set.") Case $msg = $CUSTButton GetIP() GetSN() GetGW() Run ('C:\Windows\System32\netsh.exe') sleep (1000) if $GW <>"" then send ('interface ip set address "Local Area Connection" static ' & $IP & ' ' & $SN &' ' & $GW & ' 1+{enter}') else send ('interface ip set address "Local Area Connection" static ' & $IP &' ' & $SN &'+{enter}') endif sleep (1000) send ('exit+{enter}') sleep (500) $answer = MsgBox(0, "IP Address", "Your IP address is set.") Case $msg = $PNGSapphire Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ping 192.168.31.11+{enter}') Case $msg = $PNGhpv Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ping 192.168.31.1+{enter}') Case $msg = $PNGrouter Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ping 192.168.31.31+{enter}') Case $msg = $IPrelease Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ipconfig /release+{enter}') Case $msg = $IPrenew Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ipconfig /renew+{enter}') Case $msg = $IPall Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ipconfig /all+{enter}') Case $msg = $IPrco Run ('C:Gemcombinrubycommoptions.exe') Case $msg = $EXITButton exit EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoop ;ends the application if the red X is clicked on the gui Wend ;~~~~~~~~~~~~~~~~~~~ func GetIP() ;remove any information in the variables $IP = "" ;accepts user input $IP = InputBox("Enter IP Address", "Please enter the IP address in this format: xxx.xxx.xxx.xxx", "", "", 0,0) If @Error = 1 then Exit endIf ValidIP($IP) EndFunc ;~~~~~~~~~~~~~~~~~~~~~ func GetSN() $SN = "" ;clearing any previous data $SN = InputBox("Enter Subnet", "Please enter the subnet mask in this format: xxx.xxx.xxx.xxx", "", "", 0,0) If @Error = 1 then Exit EndIf ValidSN($SN) EndFunc ;~~~~~~~~~~~~~~~~~~~~~~~~ func GetGW() $GW = "" ;clearing any previous data $GW = InputBox("Enter Gateway", "Please enter the gateway in this format: xxx.xxx.xxx.xxx - or leave blank", "", "", 0,0) If $GW <> "" then ValidGW($GW) ; only needs to check for validity if field is not left blank. EndIf endfunc ;~~~~~~~~~~~~~~~~~~~~~~ func ValidIP($IPcheck) $arrayIP = StringSplit($IPcheck, ".") if $arrayIP[0] <> 4 then msgbox(16, "Error", "Invalid IP range.") GetIP() elseif $arrayIP[1] < 1 OR $arrayIP[1] > 255 then msgbox(16, "Error", "Invalid IP range.") GetIP() elseif $arrayIP[2] > 255 then msgbox(16, "Error", "Invalid IP range.") GetIP() elseif $arrayIP[3] > 255 then msgbox(16, "Error", "Invalid IP range.") GetIP() elseif $arrayIP [4]> 255 then msgbox(16, "Error", "Invalid IP range.") GetIP() EndIf $count = 1 while $count < 5 if (StringIsDigit($arrayIP[$count]) ==0) then msgbox(16, "Error", "No letters or special characters allowed.") GetIP() EndIf $count = $count +1 wend endFunc ;~~~~~~~~~~~~~~~~~~~~~~~~ func ValidSN($SNCheck) $arraySN = StringSplit($SNcheck, ".") if $arraySN[0] <> 4 then ;the first element in the split array gives the number of elements. If there's more or less than 4 elements (192.168.1, or 192.124.23.1.2) then there is an error. msgbox(16, "Error", "Invalid Subnet range.") GetSN() elseif $arraySN[1] < 1 OR $arraySN[1] > 255 then msgbox(16, "Error", "Invalid Subnet range.") GetSN() elseif $arraySN[2] > 255 then msgbox(16, "Error", "Invalid Subnet range.") GetSN() elseif $arraySN[3] > 255 then msgbox(16, "Error", "Invalid Subnet range.") GetSN() elseif $arraySN[4]> 255 then msgbox(16, "Error", "Invalid Subnet range.") GetIP() EndIf ;the array containing the information from the entry starts at element 1, not 0. Here, we run through a loop looking for non numeric entries. $count = 1 while $count < 5 if (StringIsDigit($arraySN[$count]) ==0) then msgbox(16, "Error", "No letters or special characters allowed.") GetIP() EndIf $count = $count +1 wend endFunc ;~~~~~~~~~~~~~~~~~~~~~~~~ func ValidGW($GWCheck) $arrayGW = StringSplit($GWcheck, ".") if $arrayGW[0] <> 4 then msgbox(16, "Error", "Invalid IP range.") GetGW() elseif $arrayGW[1] < 1 OR $arrayGW[1] > 255 then msgbox(16, "Error", "Invalid IP range.") GetGW() elseif $arrayGW[2] > 255 then msgbox(16, "Error", "Invalid IP range.") GetGW() elseif $arrayGW[3] > 255 then msgbox(16, "Error", "Invalid IP range.") GetGW() elseif $arrayGW[4]> 255 then msgbox(16, "Error", "Invalid IP range.") GetGW() EndIf ;the array containing the information from the entry starts at element 1, not 0. Here, we run through a loop looking for non numeric entries. $count = 1 while $count < 5 if (StringIsDigit($arrayGW[$count]) ==0) then msgbox(16, "Error", "No letters or special characters allowed.") GetGW() EndIf $count = $count +1 wend endFunc Func _IsInternetConnected() Local $aReturn = DllCall('connect.dll', 'long', 'IsInternetConnected') If @error Then Return SetError(1, 0, False) EndIf Return true ;$aReturn[0] = 0 EndFunc ;==>_IsInternetConnected
-
DOH! If _IsInternetConnected = 1 Then should be If _IsInternetConnected() = 1 Then Durn brackets. Yup, long day. Thanks guys!
-
Actually tried that first, with the same error. Love your tagline by the way!
-
Hm. So something like: If _IsInternetConnected = 1 Then $answer = MsgBox(0, "Please make sure your network cable is connected, then restart IP Change.") Exit EndIf Func _IsInternetConnected() Local $aReturn = DllCall('connect.dll', 'long', 'IsInternetConnected') If @error Then Return SetError(1, 0, False) EndIf Return $aReturn[0] = 0 EndFunc ;==>_IsInternetConnected Actually, I get an error. Error parsing function call. *sigh* been a long day, brain just isn't working!
-
I'm having trouble with figuring out how to simply check whether my local area connection is active before executing the rest of my script. If the network cable is plugged in, then do this if it's not, then send error message "plug the cable in". I'd rather not have to call the adapters properties to text and read it back in. Something like If NetworkStatus = True Do my script if NetworkStatus = False "Plug in the doggone network cable!" My problem is figuring out the best way to check the status! Any ideas?
-
Buttons, Labels and Clicks, OH MY
smedley89 replied to smedley89's topic in AutoIt General Help and Support
Thank you very much! I figured it had to be something simple I was overlooking! -
Buttons, Labels and Clicks, OH MY
smedley89 replied to smedley89's topic in AutoIt General Help and Support
Actually, the issue seems to start at the HPV-20 button. The buttons above it, and the exit button at the bottom seem to have no issue. I'm sure at this point it's something screwey I've missed. ; OS: XP, Windows 7 ; Author: Ken Stillings ; #include <GUIConstants.au3> ;declaring the variables needed for user input Global $IP = "" Global $SN = "" Global $GW = "" Global $Error = "" ;creating the GUI and related buttons GUICreate("CBE IP Change", 255, 390) GuiCtrlCreateLabel(" (Click to set for ASA)", 5, 15, 140, 30) $ASAButton = GUICtrlCreateButton("ASA", 130, 5, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Sets IP to" & @cr &"192.168.31.200"& @cr &"255.255.255.0"& @cr &"192.168.31.31") GuiCtrlCreateLabel(" (Click to set for SFC)", 5, 50, 135, 30) $SFCButton = GUICtrlCreateButton("SFC", 130,40, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Sets IP to" & @cr & "169.254.196.200"& @cr &"255.255.255.0") GuiCtrlCreateLabel(" (Click to set Custom IP)", 5, 85, 180, 30) $CUSTButton = GUICtrlCreateButton("Custom", 130,75, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "This button allows you to enter"& @cr & "your own IP information") GuiCtrlCreateLabel("(Click to set for Standard)", 5, 120, 135, 30) $STDButton = GUICtrlCreateButton("Standard", 130,110, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Restores your IP to DHCP which"& @cr &"pulls the IP from the router") GuiCtrlCreateLabel(" (Click to ping Sapphire)", 5, 155, 155, 30) $PNGSapphire = GUICtrlCreateButton("Sapphire", 130,145, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Pings the Sapphire"& @cr &"IP 192.168.31.11") GuiCtrlCreateLabel(" (Click to ping HPV-20)", 5, 190, 190, 30) $PNGhpv = GUICtrlCreateButton("HPV-20", 130,180, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Pings the HPV-20"& @cr &"IP 192.168.31.1") GuiCtrlCreateLabel(" (Click to ping Router)", 5, 225, 225, 30) $PNGrouter = GUICtrlCreateButton("ROUTER", 130,215, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Pings the router at "& @cr &"IP 192.168.31.31") GuiCtrlCreateLabel("(Run IPCONFIG /Release)", 5, 260, 225, 30) $IPrelease = GUICtrlCreateButton("/RELEASE", 130,250, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Runs the"& @cr &"IPCONFIG /release command") GuiCtrlCreateLabel(" (Run IPCONFIG /Renew)", 5, 295, 225, 30) $IPrenew = GUICtrlCreateButton("/RENEW", 130,285, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Runs the"& @cr &"IPCONFIG /renew command") GuiCtrlCreateLabel(" (Run IPCONFIG /All)", 5, 330, 225, 30) $IPall = GUICtrlCreateButton("/ALL", 130,320, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Runs the IPCONFIG /ALL"& @cr &"command, showing current"& @cr &"IP configuration") $EXITButton = GUICtrlCreateButton("Exit", 130,355, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "This button exits the program") ; GUI MESSAGE LOOP GuiSetState() While 1 $msg = GUIGetMsg() Select Case $msg = $ASAButton Run ('C:\Windows\System32\netsh.exe') sleep (1000) send ('interface IP set address name="Local Area Connection" source=static 192.168.31.200 255.255.255.0 192.168.31.31 1+{enter}') sleep (1000) send ('exit+{enter}') sleep (1000) $answer = MsgBox(0, "IP Address", "Your IP address is set.") Case $msg = $SFCButton Run ('C:\Windows\System32\netsh.exe') sleep (1000) send ('interface ip set address name="Local Area Connection" source=static 169.254.196.200 255.255.255.0+{enter}') sleep (1000) send ('exit+{enter}') sleep (1000) $answer = MsgBox(0, "IP Address", "Your IP address is set.") Case $msg = $STDButton Run ('C:\Windows\System32\netsh.exe') sleep (1000) send ('interface ip set dns name="Local Area Connection" source=DHCP+{enter}') sleep (1000) send ('interface ip set wins name="Local Area Connection" source=DHCP+{enter}') sleep (1000) send ('interface ip set address name="Local Area Connection" source=DHCP+{enter}') sleep (1000) send ('exit+{enter}') sleep (500) $answer = MsgBox(0, "IP Address", "Your IP address is set.") Case $msg = $CUSTButton GetIP() GetSN() GetGW() Run ('C:\Windows\System32\netsh.exe') sleep (1000) if $GW <>"" then send ('interface ip set address "Local Area Connection" static ' & $IP & ' ' & $SN &' ' & $GW & ' 1+{enter}') else send ('interface ip set address "Local Area Connection" static ' & $IP &' ' & $SN &'+{enter}') endif sleep (1000) send ('exit+{enter}') sleep (500) $answer = MsgBox(0, "IP Address", "Your IP address is set.") Case $msg = $PNGSapphire Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ping 192.168.31.11+{enter}') Case $msg = $PNGhpv Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ping 192.168.31.1+{enter}') Case $msg = $PNGrouter Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ping 192.168.31.31+{enter}') Case $msg = $IPrelease Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ipconfig /release+{enter}') Case $msg = $IPrenew Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ipconfig /renew+{enter}') Case $msg = $IPall Run ('C:\Windows\System32\cmd.exe') sleep (1000) send ('ipconfig /all+{enter}') Case $msg = $EXITButton exit EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoop ;ends the application if the red X is clicked on the gui Wend ;~~~~~~~~~~~~~~~~~~~ func GetIP() ;remove any information in the variables $IP = "" ;accepts user input $IP = InputBox("Enter IP Address", "Please enter the IP address in this format: xxx.xxx.xxx.xxx", "", "", 0,0) If @Error = 1 then Exit endIf ValidIP($IP) EndFunc ;~~~~~~~~~~~~~~~~~~~~~ func GetSN() $SN = "" ;clearing any previous data $SN = InputBox("Enter Subnet", "Please enter the subnet mask in this format: xxx.xxx.xxx.xxx", "", "", 0,0) If @Error = 1 then Exit EndIf ValidSN($SN) EndFunc ;~~~~~~~~~~~~~~~~~~~~~~~~ func GetGW() $GW = "" ;clearing any previous data $GW = InputBox("Enter Gateway", "Please enter the gateway in this format: xxx.xxx.xxx.xxx - or leave blank", "", "", 0,0) If $GW <> "" then ValidGW($GW) ; only needs to check for validity if field is not left blank. EndIf endfunc ;~~~~~~~~~~~~~~~~~~~~~~ func ValidIP($IPcheck) $arrayIP = StringSplit($IPcheck, ".") if $arrayIP[0] <> 4 then msgbox(16, "Error", "Invalid IP range.") GetIP() elseif $arrayIP[1] < 1 OR $arrayIP[1] > 255 then msgbox(16, "Error", "Invalid IP range.") GetIP() elseif $arrayIP[2] > 255 then msgbox(16, "Error", "Invalid IP range.") GetIP() elseif $arrayIP[3] > 255 then msgbox(16, "Error", "Invalid IP range.") GetIP() elseif $arrayIP [4]> 255 then msgbox(16, "Error", "Invalid IP range.") GetIP() EndIf $count = 1 while $count < 5 if (StringIsDigit($arrayIP[$count]) ==0) then msgbox(16, "Error", "No letters or special characters allowed.") GetIP() EndIf $count = $count +1 wend endFunc ;~~~~~~~~~~~~~~~~~~~~~~~~ func ValidSN($SNCheck) $arraySN = StringSplit($SNcheck, ".") if $arraySN[0] <> 4 then ;the first element in the split array gives the number of elements. If there's more or less than 4 elements (192.168.1, or 192.124.23.1.2) then there is an error. msgbox(16, "Error", "Invalid Subnet range.") GetSN() elseif $arraySN[1] < 1 OR $arraySN[1] > 255 then msgbox(16, "Error", "Invalid Subnet range.") GetSN() elseif $arraySN[2] > 255 then msgbox(16, "Error", "Invalid Subnet range.") GetSN() elseif $arraySN[3] > 255 then msgbox(16, "Error", "Invalid Subnet range.") GetSN() elseif $arraySN[4]> 255 then msgbox(16, "Error", "Invalid Subnet range.") GetIP() EndIf ;the array containing the information from the entry starts at element 1, not 0. Here, we run through a loop looking for non numeric entries. $count = 1 while $count < 5 if (StringIsDigit($arraySN[$count]) ==0) then msgbox(16, "Error", "No letters or special characters allowed.") GetIP() EndIf $count = $count +1 wend endFunc ;~~~~~~~~~~~~~~~~~~~~~~~~ func ValidGW($GWCheck) $arrayGW = StringSplit($GWcheck, ".") if $arrayGW[0] <> 4 then msgbox(16, "Error", "Invalid IP range.") GetGW() elseif $arrayGW[1] < 1 OR $arrayGW[1] > 255 then msgbox(16, "Error", "Invalid IP range.") GetGW() elseif $arrayGW[2] > 255 then msgbox(16, "Error", "Invalid IP range.") GetGW() elseif $arrayGW[3] > 255 then msgbox(16, "Error", "Invalid IP range.") GetGW() elseif $arrayGW[4]> 255 then msgbox(16, "Error", "Invalid IP range.") GetGW() EndIf ;the array containing the information from the entry starts at element 1, not 0. Here, we run through a loop looking for non numeric entries. $count = 1 while $count < 5 if (StringIsDigit($arrayGW[$count]) ==0) then msgbox(16, "Error", "No letters or special characters allowed.") GetGW() EndIf $count = $count +1 wend endFunc -
I have an application that works fine, except for one tiny issue. I've had to expand the number of tasks to the point that I've had to shrink the buttons down a bit. Each button has a label describing what it does. The issue is that you cannot click where the label or text is.. only on the outskirts of the button to have it perform its task. Is there something I can do to make the label clickable, or make it so that it doesn't mask the button below it? Here is a snippet with the label and button creation: GuiCtrlCreateLabel(" (Click to set for SFC)", 5, 50, 135, 30) $SFCButton = GUICtrlCreateButton("SFC", 130,40, 120, 30) ;the following line creates a tooltip GuiCtrlSetTip(-1, "Sets IP to" & @cr & "169.254.196.200"& @cr &"255.255.255.0")
-
You guys are awesome! Thanks!
-
I'm creating a script that will apply an IP address, subnet mask, and a gateway when needed. In the script, we have two static settings, one for two different devices, as well as a setting that resets the ipv4 back to DHCP. We are wanting to also allow the user to input an IP address through the script and apply it. So far, all is working well. My issue here is with validation. Is there a simple way to make sure that the input is in the xxx.xxx.xxx.xxx format? No commas, no letters, that sort of thing? Also, can an input mask be applied? Say something like having a box that has ---.---.---.---, with the user simply filling in the spaces, allowing some spaces to be empty to accommodate an IP address such as 23.123.23.1? Near as I can tell, I have the rest done. I've searched through the forums for validation, and input masks, and am not really finding anything that I can (or know how to) use. Any help would be greatly appreciated!