Jump to content

Simple question regarding EditBox


Doxie
 Share

Recommended Posts

How can i do so the info that is typed into a EDITBOX

is saved into a .ini file?

I know this might be very easy, but i'm lost :ph34r:

$edit_1 = GUISetControl("edit", "Edit 1", 40, 40, 110, 20)

GuiShow()

While 1
    sleep(100)
    $msg = GuiMsg(0)
    Select
    Case $msg = -3
        Exit
    Case $msg = 0
       ;;;
    Case $msg = $edit_1
;;;
    EndSelect
WEnd

This will show a Editbox, but if i use iniwrite $edit_1 it only type a 3???

Thanks in advance

Were ever i lay my script is my home...

Link to comment
Share on other sites

Of course i meant InputBox :ph34r:

You wrong, you are trying to retrieve info from and "input" control.

That can be done with GuiRead($edit_1).

:(

BTW your example is incomplete as a Gui need to be create with GuiCreate before defining controls.

Link to comment
Share on other sites

yea i know its incomple, since i thought everyone knew you had to make GUICreate :(

Well i found out how to do it myself.

This is "part" of the code i used.

Case $Msg = $butsave
    $PDA = GuiRead($EPDA)
    $Printer = GuiRead($EPrinter)
    $SPrint = GuiRead($EPrint)
    $Dept = GuiRead($EDept)
    IniWrite($inventory, "Inventory", "PDA", $EPDA)
    IniWrite($inventory, "Inventory", "Printer", $EPrinter)
    IniWrite($inventory, "Inventory", "SPrint", $EPrint)
    IniWrite($inventory, "Inventory", "Dept", $EDept)

And its working really nice aswell

EDIT

This is the working code :ph34r:

Case $Msg = $butsave
    $PDA = GuiRead($EPDA)
    $Printer = GuiRead($EPrinter)
    $SPrint = GuiRead($EPrint)
    $Dept = GuiRead($EDept)
    IniWrite($inventory, "Inventory", "PDA", $PDA)
    IniWrite($inventory, "Inventory", "Printer", $Printer)
    IniWrite($inventory, "Inventory", "SPrint", $SPrint)
    IniWrite($inventory, "Inventory", "Dept", $Dept)
Edited by Doxie

Were ever i lay my script is my home...

Link to comment
Share on other sites

Ok, now when i solved that i have another problem :ph34r:

Is there anyway i can use a Dropdown Menu in my GUI?

If so where can i read about it in the help file.

Were ever i lay my script is my home...

Link to comment
Share on other sites

Ok, now when i solved that i have another problem :ph34r:

Is there anyway i can use a Dropdown Menu in my GUI?

If so where can i read about it in the help file.

"Combo" control can simulate a dropdown menu

see GuiSetControl and GuiSetControlData to initialize the list and GuiRead for retrieving the selected entry :(

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...