demandnothing Posted October 26, 2009 Share Posted October 26, 2009 $Filter = @ScriptDir & "\Inject.txt" $File = _FileCreate($Filter) $xFile = FileOpen("Inject.txt", 2) Case $Add $Path = FileOpenDialog("", @ScriptDir, "Dynamic Link Lybrary (*.DLL)") $Write = FileWriteLine($xFile, $Path & @CRLF) If $Write = 1 Then GUICtrlSetData($List1, $Path) EndIf its not writing to the file... what am i doing wrong? Link to comment Share on other sites More sharing options...
Developers Jos Posted October 26, 2009 Developers Share Posted October 26, 2009 try: $Filter = @ScriptDir & "\Inject.txt" $xFile = FileOpen($Filter, 2) Case $Add $Path = FileOpenDialog("", @ScriptDir, "Dynamic Link Lybrary (*.DLL)") $Write = FileWriteLine($xFile, $Path & @CRLF) If $Write = 1 Then GUICtrlSetData($List1, $Path) EndIf SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
demandnothing Posted October 26, 2009 Author Share Posted October 26, 2009 (edited) try: $Filter = @ScriptDir & "\Inject.txt" $xFile = FileOpen($Filter, 2) Case $Add $Path = FileOpenDialog("", @ScriptDir, "Dynamic Link Lybrary (*.DLL)") $Write = FileWriteLine($xFile, $Path & @CRLF) If $Write = 1 Then GUICtrlSetData($List1, $Path) EndIf i did and it didnt work either.. $Write does = 1 and it does write to the GUI but the file remains blank. I APPOLOGIZE FOR THIS POST!!!! THE REASON IT WAS NOT WORKING WAS BECAUSE I HAD THE FILE VARIABLES OUTSIDE OF THE WHILE LOOP Edited October 26, 2009 by demandnothing Link to comment Share on other sites More sharing options...
Developers Jos Posted October 26, 2009 Developers Share Posted October 26, 2009 Did you check after the script ended of closed the file? Else check the @error returned for the FileOpen() and FileWrite(). SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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