Jump to content

Problem about GUIcreatinput


 Share

Recommended Posts

Hey There

I coult'nt able to do this.I create a inputbox over a forum.when i write here smthing then i ll click a button on the forum to keep this veriable in an .txt file or .ini whatever...when i need this veriable i have to read it.

here is my fail experiment.:)

#Include <Constants.au3>

#include <ButtonConstants.au3>

#include <Date.au3>

#include <GUIConstantsEX.au3>

$hGUI = GUICreate("xxxx", 265, 325)

;GUI labels -

GUICtrlCreateLabel("test", 5, 15, 200, 35)

GuiCtrlCreateLabel("Version beta" & @CRLF & "test", 5, 295, 180, 50)

$mod=GUICtrlCreateInput("",50,20,20,20)

$Button_1 = GUICtrlCreateButton("Ayarlari kaydet", 5, 100, 76, 25, $BS_LEFT)

$SuccessLog = FileWrite("test.ini", $mod)

GUISetState()

///////////////

Regards.

Link to comment
Share on other sites

FileWrite("test.ini", GuiCtrlRead($mod))

Thanks for reply Gary ...

whold you show me how i can set this commands on button click?

when i click buttton takes veriable in inputs to save xxx.ini.

i tryed some combination like that

$Button_1 = GUICtrlCreateButton("save veriable", 5, 100, 76, 25, $BS_LEFT)

FileWrite($file,"",($mod))

$Button_1=FileWrite("test.ini",GUICtrlRead($mod))

but wont work.

Link to comment
Share on other sites

Thanks for reply Gary ...

whold you show me how i can set this commands on button click?

when i click buttton takes veriable in inputs to save xxx.ini.

i tryed some combination like that

$Button_1 = GUICtrlCreateButton("save veriable", 5, 100, 76, 25, $BS_LEFT)

FileWrite($file,"",($mod))

$Button_1=FileWrite("test.ini",GUICtrlRead($mod))

but wont work.

Try this:

#include <Constants.au3>
#include <ButtonConstants.au3>
#include <Date.au3>
#include <GUIConstantsEX.au3>

$GUI = GUICreate("xxxx", 265, 325)
GUICtrlCreateLabel("test", 5, 15, 200, 35)
GUICtrlCreateLabel("Version beta" & @CRLF & "test", 5, 295, 180, 50)
$Mod = GUICtrlCreateInput("", 50, 20, 20, 20)
$Button_1 = GUICtrlCreateButton("Ayalari kaydet", 5, 100, 76, 25, $BS_LEFT)

GUISetState()
While 1
    $nMsg = GUIGetMsg()
    Select
    Case $nMsg = $GUI_EVENT_CLOSE
        Exit
    Case $nMsg = $Button_1
        $Read = GUICtrlRead($Mod)
        $SuccesLog = FileWrite("test.ini", $Read)
    EndSelect
WEnd

AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

Thanks for Time AlmarM

HotKeySet("{F5}","smthing")

$Mod = GUICtrlCreateInput("test1", 80, 230, 250, 18)

GUICtrlSetBkColor(-1, 0x000000)

GUICtrlSetColor(-1,0x00FFFF)

$Mod = GUICtrlCreateInput("test2", 80, 230, 250, 18)

GUICtrlSetBkColor(-1, 0x000000)

GUICtrlSetColor(-1,0x00FFFF)

GUISetState()

While 1

$nMsg = GUIGetMsg()

Select

Case $nMsg = $GUI_EVENT_CLOSE

Exit

Case $nMsg = $Button_1

$Read = GUICtrlRead($Mod)

$SuccesLog = FileWrite("test.ini", $Read)

EndSelect

WEnd

func smthing()

......................

in this area i have to put code like this read test.ini (test1,test2)

send("test1")

sleep(100)

send("test2")

WEnd.

any clue pls?

Link to comment
Share on other sites

$iniread_test1 = IniRead(@ScriptDir & "/config.ini", "D", "Mode1","")

$xxx = GUICtrlCreateInput($iniread_test1, 70, 235, 60, 21)

IniWrite(@ScriptDir & "/config.ini", "D", "Mode1",GUICtrlRead($xxx))

at least i found out.

so pls someone can explain to me how i can send variable from ini?

example

//////////

hotkeyset("{F5}","testsend")

send()====what i should write here send variable?

wend

Regards

Edited by metjumper
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...