Jump to content

Make msgbox show input box's text


Recommended Posts

This is what I have.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 174, 61, 193, 147)
$Input1 = GUICtrlCreateInput("Input1", 8, 16, 145, 21)
$Button1 = GUICtrlCreateButton("Button1", 32, 40, 89, 17, 0)
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case  $msg = $Button1
            MsgBox(0, "Test", $Input1)
    EndSwitch
WEnd

And all the msgbox shows is 3, and i don't even have to push the button, the msg box just keeps popping.

Link to comment
Share on other sites

Not really that hard. You wanted to get the value of the input, so that should have been the first place you looked- GUICtrlCreateInput. Under the remarks heading is the first easy answer.

To obtain the value of the control see GUICtrlRead.

Obviously you are correct in your assumption.

Link to comment
Share on other sites

Not really that hard. You wanted to get the value of the input, so that should have been the first place you looked- GUICtrlCreateInput. Under the remarks heading is the first easy answer.

To obtain the value of the control see GUICtrlRead.

Obviously you are correct in your assumption.

But I can't check any remarks or anything like that, My helpfile just does Not work. Edited by Godly
Link to comment
Share on other sites

#include <ButtonConstants.au3>

#include <EditConstants.au3>

#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 174, 61, 193, 147)

$Input1 = GUICtrlCreateInput("Input1", 8, 16, 145, 21)

$Button1 = GUICtrlCreateButton("Button1", 32, 40, 89, 17, 0)

GUISetState(@SW_SHOW)

While 1

$msg = GUIGetMsg()

Select

Case $msg = $Button1

MsgBox(0, "Test", GUICtrlRead($Input1))

EndSelect

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

sleep(100)

WEnd

Link to comment
Share on other sites

Well what happens when you try to open the helpfile? Nothing? Error?

Can you open other help files like AutoIt's?

I click on a function, hit display and where it would normally display the example ect. just complete white. And no I can't read any other .chm's
Link to comment
Share on other sites

I click on a function, hit display and where it would normally display the example ect. just complete white. And no I can't read any other .chm's

Try this: HTML Help - Diagnostics (DL)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...