AntiBNI Posted January 13, 2007 Share Posted January 13, 2007 hmm, i have another obstacle on my way xD. The problem is that i want to write a log file from an input. i tried many ways and all ended in failure. i tried:_FileWriteLog (@SysDir & "\file\save.log",GUICtrlRead($misc)) $misc is the Input av _FileWriteLog (@SysDir & "\file\save.log",$misc none of those work. im new in log , ini , dll stuff so. sorry if im making an horrible mistake xD. Link to comment Share on other sites More sharing options...
Uten Posted January 13, 2007 Share Posted January 13, 2007 Provide a bigger section of you code. Preferably something that works (or don't work but should n your opinion). Something like $gui = GuiCreate("My test") $inp = GuiCtrlCreateInput("This is my text" @Hour & ":" & @MIN & ":" & @SEC, 10, 10 ) GuiSetState(@SW_SHOW) Sleep(500) FileWrite("C:`mylog.log", GuiCtrlRead($inp)) Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
AntiBNI Posted January 13, 2007 Author Share Posted January 13, 2007 (edited) Ok, here it is. #include <GUIConstants.au3> #include <File.au3> GUICreate("programl",200,200) $misc=GUICtrlCreateInput ("",100,100,110,20) $save=GUICtrlCreateButton ("save",50,50) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $save _FileWriteLog (@SystemDir & "\file\save.log",GUICtrlRead($misc)) EndSelect Wend I just want to save what you typed in the input save it on the log file. Cheers. Anti Edited January 13, 2007 by AntiBNI Link to comment Share on other sites More sharing options...
martin Posted January 13, 2007 Share Posted January 13, 2007 (edited) Ok, here it is. #include <GUIConstants.au3> #include <File.au3> GUICreate("programl",200,200) $misc=GUICtrlCreateInput ("",100,100,110,20) $save=GUICtrlCreateButton ("save",50,50) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $save _FileWriteLog (@SystemDir & "\file\save.log",GUICtrlRead($misc)) EndSelect Wend I just want to save what you typed in the input save it on the log file. Cheers. Anti Looks ok to me, but areyou sure you have a folder @SystemDir & "\file"? Edited January 13, 2007 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
AntiBNI Posted January 13, 2007 Author Share Posted January 13, 2007 yeah, i dont know whats wrong but it aint creating the file. Link to comment Share on other sites More sharing options...
nobbe Posted January 13, 2007 Share Posted January 13, 2007 yeah, i dont know whats wrong but it aint creating the file. hi i changed a bit for debugging , works here fine now ?? make shure you have the system rights to save file and directory exists .? #include <GUIConstants.au3> #include <File.au3> GUICreate("programl",200,200) $misc=GUICtrlCreateInput ("",100,100,90,20) $save=GUICtrlCreateButton ("save",50,50) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $save $my_line = GUICtrlRead($misc); MsgBox(0, "info" , $my_line ); $f= @SystemDir & "\file\mysave.log" MsgBox(0, "file" , $f ); _FileWriteLog ($f, $my_line ) EndSelect Wend Link to comment Share on other sites More sharing options...
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