Jump to content
Sign in to follow this  

needing help with GUICtrlCreateInput

Recommended Posts


Ok here it is I'm Back. :(

This is what I am needing to do. Set up 10 input boxes in a window. Write all the values to an ini file. All inputs have different keys.

I thought i was on the right track until I looked at the ini file it created. Keeps returning a value of "3" :)

It doesn't matter what I type into the boxes. once i click save it writes a value of 3 to the ini.

And here i thought i would make it 24 hrs without having to post on here. :)

I will keep working on it and checking back here also.

any and all ideas are appreciated. Thx from Cue

#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)


Func Example()
    Local $Button_1, $msg, $test1
    GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered
    $test1 = GUICtrlCreateInput("Test", 10, 5, 300, 20)
    GUICtrlSetState(-1, $GUI_DROPACCEPTED)
    GUICtrlCreateInput("", 10, 35, 300, 20)     ;   
    $Button_1 = GUICtrlCreateButton("save", 10, 100, 100)
    GUISetState()      ; will display an  dialog box with 1 button

    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
            Case $msg = $GUI_EVENT_CLOSE
            Case $msg = $Button_1
                IniWrite("C:\Users\Main\Desktop\test.ini", "script test","test1", $test1)    ; Will write to ini file
EndFunc   ;==>Example

Share this post

Link to post
Share on other sites


IniWrite("C:\Users\Main\Desktop\test.ini", "script test","test1", GUICtrlRead($test1))



Share this post

Link to post
Share on other sites


thx, that did the trick. I just couldn't figure out how write and read in the same line would work together. Guessing i need to start thinking about this stuff in a different way.

Appreciate your help.

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.