BeZ Posted August 24, 2006 Posted August 24, 2006 I would like to make a scrip log file out of this: #include <GUIConstants.au3> ;#NoTrayIcon Dim $button_start Dim $prix dim $cout MsgBox(0, "Script", "Starting Script") Bloquage () Func Bloquage () GuiCreate("blocked", 1024, 768, 0, 0, BitOR($WS_BORDER, $WS_POPUP), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) $button_start = GUICtrlCreateButton("Click to start", 452, 374, 120) GUICtrlCreateInput ( "Last name", 452, 326, 120, 20) GUICtrlCreateInput ( "First name", 452, 350, 120, 20) While 1 GUISetState() $msg = GUIGetMsg() Select Case $msg = $button_start ExitLoop EndSelect WEnd EndFunc Exit I want "First name" and "Last name" to be stored in a log file (anything.log if im right). How can I do this ? Thanks for the help, BeZ
BPBNA Posted August 24, 2006 Posted August 24, 2006 Use GUICtrlRead to get the entered information and write it to a file with either FileWriteLine or _FileWriteLog.
Xenobiologist Posted August 24, 2006 Posted August 24, 2006 HI, what about starting with the tut? #include <GUIConstants.au3> #include <File.au3> ;#NoTrayIcon Dim $button_start Dim $prix dim $cout MsgBox(0, "Script", "Starting Script") Bloquage () Func Bloquage () GuiCreate("blocked", 1024, 768, 0, 0, BitOR($WS_BORDER, $WS_POPUP), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) $button_start = GUICtrlCreateButton("Click to start", 452, 374, 120) $lname = GUICtrlCreateInput ( "Last name", 452, 326, 120, 20) $fname = GUICtrlCreateInput ( "First name", 452, 350, 120, 20) While 1 GUISetState() $msg = GUIGetMsg() Select Case $msg = $button_start _FileWriteLog(@ScriptDir & "\my.log","Lastname : " & GUICtrlRead($lname) & " | " & "First name : " & GUICtrlRead($fname)) ExitLoop EndSelect WEnd EndFunc Exit 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
BeZ Posted August 24, 2006 Author Posted August 24, 2006 (edited) So easy to understand and works so well, thanks Mega. Sad I didn't find it myself I searched in the function reference for word "log" and did'nt see filewritelog ... So many well hidden things. BeZ Edited August 24, 2006 by BeZ
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now