Jump to content
Sign in to follow this  
Folker

Help With AddIni command

Recommended Posts

Folker

Hey, i have a button on my menu which makes some boxes appear, i want the user to be able to type into the boxes and then click a button which takes the data from all the boxes and makes a new .ini file. Here is what i have so far:

Case $msg = $menadd
    #include <GuiConstantsEx.au3>
    $addfname = GUICtrlCreateInput("NewName",380,20,100);TextBox For User To Enter Name In!!
    guictrlcreatelabel("Name:",320,25);Name Label
    $addsname = GUICtrlCreateInput("Surname",380,40,100)
    guictrlcreatelabel("Surname:",320,45)
    $butaddfile = GUICtrlCreateButton("Add File",380,100)

(Some data has been changed.. for the example it is entering your name etc..)

then each variable (say $addfname) has a dropdown box giving the user options on what key it is. E.G dropdown would list: First Name, Last Name.

So when the user selects the add file button it takes all the data from the entry forms, and adds it all into the keys specified in dropdown boxes.

Can someone give me a example on how to do this.

Please tell me if you dont understand me :P

Thanks,

Folker.

Share this post


Link to post
Share on other sites
martin

Hey, i have a button on my menu which makes some boxes appear, i want the user to be able to type into the boxes and then click a button which takes the data from all the boxes and makes a new .ini file. Here is what i have so far:

Case $msg = $menadd
    #include <GuiConstantsEx.au3>
    $addfname = GUICtrlCreateInput("NewName",380,20,100);TextBox For User To Enter Name In!!
    guictrlcreatelabel("Name:",320,25);Name Label
    $addsname = GUICtrlCreateInput("Surname",380,40,100)
    guictrlcreatelabel("Surname:",320,45)
    $butaddfile = GUICtrlCreateButton("Add File",380,100)

(Some data has been changed.. for the example it is entering your name etc..)

then each variable (say $addfname) has a dropdown box giving the user options on what key it is. E.G dropdown would list: First Name, Last Name.

So when the user selects the add file button it takes all the data from the entry forms, and adds it all into the keys specified in dropdown boxes.

Can someone give me a example on how to do this.

Please tell me if you dont understand me :P

Thanks,

Folker.

Maybe this is what you mean.

Case $msg = $menadd
    #include <GuiConstantsEx.au3>;put this line at the top of your script
    $addfname = GUICtrlCreateInput("NewName", 380, 20, 100);TextBox For User To Enter Name In!!
    GUICtrlCreateLabel("Name:", 320, 25);Name Label
    $addsname = GUICtrlCreateInput("Surname", 380, 40, 100)
    GUICtrlCreateLabel("Surname:", 320, 45)
    $butaddfile = GUICtrlCreateButton("Add File", 380, 100)
    While 1
        $msg2 = GUIGetMsg()
        If $msg2 = $butaddfile Then
            IniWrite("inifilename", "MainSection", "Name", GUICtrlRead($addfname))
            IniWrite("inifilename", "MainSection", "Surname", GUICtrlRead($addsname))
            ExitLoop
        EndIf
        if $msg2 = $GUI_EVENT_CLOSE then exit;?
    WEnd

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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.