Sign in to follow this  
Followers 0
demandnothing

Please Help With FileWriteLine

4 posts in this topic

$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?

Share this post


Link to post
Share on other sites



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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by demandnothing

Share this post


Link to post
Share on other sites

Did you check after the script ended of closed the file?

Else check the @error returned for the FileOpen() and FileWrite().


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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