IvanCodin Posted February 14, 2008 Share Posted February 14, 2008 I am not seeing the correct values for the GUICtrlCreateInput box. I can't find anything in the HelpFile that tells me whats wrong. I am using the MSGBox and SplashText to display my values. Any ideas? CC CODE#include <GUIConstants.au3> Global $GUIWidth Global $GUIHeight $GUIWidth = 400 $GUIHeight = 200 GUICreate("Connect Network Tool",$GUIWidth,$GUIHeight) $port = "" ; port to null $trackmenu = GuiCtrlCreateContextMenu () $aboutitem = GuiCtrlCreateMenuitem ("About",$trackmenu) GuiCtrlCreateMenuitem ("",$trackmenu) $exititem = GuiCtrlCreateMenuitem ("Exit",$trackmenu) $ok_button = GUICtrlCreateButton("OK", 5,20,30) GuiCtrlCreateLabel("Select RAS Port", 65, 5, 100) ; provide 4 possable RAS modem ports $radio1 = GUICtrlCreateRadio("C1", 80, 20,70) $radio2 = GUICtrlCreateRadio("C2", 80, 40,70) $radio3 = GUICtrlCreateRadio("C3", 80, 60,70) $radio4 = GUICtrlCreateRadio("C4", 80, 80,70) ; moved from one server to another and need to clear arp $cb1 = GuiCtrlCreateCheckbox("Clear ARP cache", 200, 80, 100, 30) GuiCtrlSetState(-1, $GUI_UNCHECKED) $cb1s = GUICtrlRead($cb1) ; INPUT $rasip = GuiCtrlCreateInput("RAS IP Address", 200, 25, 100, 20) $tele = GuiCtrlCreateInput("Telephone number", 200, 55, 100, 20) GUISetState() While 1 $msg = GuiGetMsg() If $msg = $exititem Or $msg = -3 Or $msg = -1 Then ExitLoop If $msg = $aboutitem Then Msgbox(0,"About","Network Connect Version 0.91.1") ; While 1 Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $ok_button MsgBox(0, "Info", "You press OK.. ", 3) ExitLoop Case $msg = $radio1 $port = "C1" Case $msg = $radio2 $port = "C2" Case $msg = $radio3 $port = "C3" Case $msg = $radio4 $port = "C4" Case $msg = $cb1 $cbs = "CB-1" EndSelect WEnd ; If $port <> "" Then MsgBox(0, "Info", "You selected port " & $port, 8) ;Else MsgBox(0, "Info", "No port selected", 3) MsgBox(0, "Info", "Port selected is " & $port & @CRLF & "The telephone number is " & @CRLF & $tele & @CRLF & " The RAS IP is " & $rasip, 3) SplashTextOn("The telephone number is " & $tele, 300,220) Sleep(2000) SplashOff() SplashTextOn("The RAS IP is " & $rasip, 300,220) Sleep(2000) SplashOff() GUIDelete() Exit Link to comment Share on other sites More sharing options...
GaryFrost Posted February 14, 2008 Share Posted February 14, 2008 GuiCtrlRead to get the value of the input control(s) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
jokke Posted February 14, 2008 Share Posted February 14, 2008 When reading any gui control you need to use GuiCtrlRead() UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
GEOSoft Posted February 14, 2008 Share Posted February 14, 2008 When reading any gui control you need to use GuiCtrlRead()Not quite true. It is true for Input/Edit/Combobox, List &Etc. however it is not true for Checkboxes or Radios. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
IvanCodin Posted February 14, 2008 Author Share Posted February 14, 2008 Thanks for the qucik response!!! Off to GUICtrlread I go CC Link to comment Share on other sites More sharing options...
jokke Posted February 14, 2008 Share Posted February 14, 2008 (edited) Not quite true. It is true for Input/Edit/Combobox, List &Etc. however it is not true for Checkboxes or Radios.Well i use this for reading Chackboxes:BitAnd(GUICtrlRead($item),$GUI_CHECKED)So its partly true, since BitAnd is also needed for checkboxes. But i uderstand, badly typed by me. Edited February 14, 2008 by jokke UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now