Sign in to follow this  
Followers 0
mircea

is hard to play with GUI :((

5 posts in this topic

Well now my problem is just to WRITE the $$$$ file and i dont get it how to make it all is working all is perfect ( this is a part of a bigger project)

can you tell me how can i write and P.S when i go to AGENDA PERSONALA ( PERSONAL AGENDA) i want to automaticly read the $scrie and can add and save

so please AUTOIT team and friends of AutoIT PIMP MY SCRIPT

#include <GUIConstants.au3>
#include <GuiList.au3>
#include <GuiCombo.au3>
#include <File.au3>

$Scrie = Fileopen("D:\1 password program\cel bun\agenda personala.txt",1)
Opt ('MustDeclareVars', 1)

Dim $msg, $ret, $scrie
Dim $input, $listbox, $button

GUICreate("ListBox Add Item Demo", 500, 350, -1, -1)
GUICtrlCreateLabel("Adauga ce ai pe ziua de azi", 25, 15)
$input = GUICtrlCreateInput("", 165, 10, 180, 25)

$listbox = GUICtrlCreateList("", 165, 40, 180, 120)
$button = GUICtrlCreateButton("Add to List", 175, 160, 120, 40)

GUISetState()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $button
            If (StringLen(GUICtrlRead($input)) > 0) Then
                $ret = _GUICtrlListAddItem ($listbox, GUICtrlRead($input))
                FileWrite($Scrie, $input)
                FileClose($Scrie)
            EndIf
    EndSelect
WEnd

Share this post


Link to post
Share on other sites



Well for the load and save.. you can only read OR write to a file, so you would have to close the file between those to things


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

so please AUTOIT team and friends of AutoIT PIMP MY SCRIPT

Too bad "X to the Z - Xzibit" isn't here :)

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

well i dont get it :-| sorry what do you mean to close ?

Share this post


Link to post
Share on other sites

The file itself.. You open a file with FileOpen then you read it.. Close the file.. Open the file again to write.. and then write the text..


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

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  
Followers 0