Jump to content
Sign in to follow this  
Erik.

Send file to .txt file

Recommended Posts

Erik.

Hi,

I can get info about someone whit an ini file but how to save that info to an txt file?

Howto make when a program startup that it makes a txt file whit the data of today whit an inputbox?


I little problem, hard to find and fix

Share this post


Link to post
Share on other sites
Xenobiologist

Hi,

sorry what?

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
jb73034

Hi,

I can get info about someone whit an ini file but how to save that info to an txt file?

Howto make when a program startup that it makes a txt file whit the data of today whit an inputbox?

$file = FileOpen("test.txt", 1)

; Check if file opened for writing OK
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

FileWrite($file, "Line1")
FileWrite($file, "Still Line1" & @CRLF)
FileWrite($file, "Line2")

FileClose($file)

right from the help file.

Edited by jb73034

Share this post


Link to post
Share on other sites
Erik.

Hi,

Thanks for the help.

I have a next problem...

When you start the program it will ask for the date of today whit inputbox.

Now when i full in the date it must make a txt file whit the name as date how to do that?

EDIT:

When the first one entered the building you have 1 line into you txt file but how to do it for every people that has entered the building that i must begin on a new line it must count how to count whit line number and how to make that you can see into the program how many peoples has entered?

When i am home i will post my program so far as i am...

EDIT:

Here is my program:

#include <GUIConstants.au3>

GUICreate("Entré I Meet",300,200)

$filemenu = GuiCtrlCreateMenu ("File")
$exititem = GuiCtrlCreateMenuitem ("Exit",$filemenu)
$helpmenu = GuiCtrlCreateMenu ("?")
$aboutitem = GuiCtrlCreateMenuitem ("About",$helpmenu)
$help = GuiCtrlCreateMenuitem ("Help",$helpmenu)


$newbutton = GuiCtrlCreateButton ("Nieuw persoon",50,130,70,20)

$cancelbutton = GuiCtrlCreateButton ("Exit",180,130,70,20)

GuiSetState()

$datum = InputBox("Datum","Voer de datum in van vandaag in dd-mm-jj")
If FileExists($datum) Then
    MsgBox(4096, "", "Bestand bestaat al")
Else
    
EndIf

While 1
    $msg = GUIGetMsg()



    Select
        Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton
            ExitLoop

        Case $msg = $exititem
            ExitLoop
        
        Case $msg = $newbutton
             $text = InputBox("Nieuw persoon", "Voer het pas nummer in.")
             $var = IniRead("members.ini", $text, "key", "Persoon niet gevonden")
             MsgBox(4096, "Result", $var)
             
        Case $msg = $aboutitem
            Msgbox(0,"About","GUI Menu Test")
        case $msg = $help
            Msgbox(64,"help","Teksthier")
        
    EndSelect
WEnd

GUIDelete()

Exit
Edited by Erik.

I little problem, hard to find and fix

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  

×