Jump to content

return value of input fields


Recommended Posts

If i had this:

$input = GUICtrlCreateInput("hi im mephy", 0, 0)

what would the value of the message be?

My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]
Link to post
Share on other sites

No, in a gui. The thing that you put text in. When you do:

GUIGetMsg()

how are you supposed to find the value of the text they entered

My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]
Link to post
Share on other sites

GuiCtrlCreate functions return a GUI Reference ID Number Thing. When you want to detect a button click, you compare the button's ID number to the value of GuiGetMsg(). You also use the ID value in functions such as GuiRead and GuiSetState and GuiSetColor.....

However, things are very different if you use Opt("GUIOnEventMode", 1)

GuiCreate("Example")

$input = GuiCtrlCreateInput("type here", 50, 50, 200, 30)
$button = GuiCtrlCreateButton("Show input in MsgBox", 50, 150, 200, 40)

GuiSetState()
While 1
   $msg = GuiGetMsg()
   If $msg = -3 Then;GUI_EVENT_CLOSE
      ExitLoop
   ElseIf $msg = $button Then
      MsgBox(4096, "Info", GuiRead($input) )
   EndIf
WEnd
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...