Jump to content
Sign in to follow this  
FinalVersion

Make msgbox show input box's text

Recommended Posts

FinalVersion

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.

Share this post


Link to post
Share on other sites
BrettF
BrettF

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.

Share this post


Link to post
Share on other sites
FinalVersion

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

Share this post


Link to post
Share on other sites
picea892

#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

Share this post


Link to post
Share on other sites
jpm

But I can't check any remarks or anything like that, My helpfile just does Not work.

deinstall AutoIt and reinstall that may correct your help pb

Share this post


Link to post
Share on other sites
BrettF
FinalVersion

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

Share this post


Link to post
Share on other sites
jpm

Tried that 4 times, no luck ^_^

how did you install with the setup.exe or the .zip?

under which system are you running 2000, XP, Vista?

What is the message you receive when it is failing ?

Share this post


Link to post
Share on other sites
ProgAndy

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

Share this post


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
Sign in to follow this  

×