oemript Posted October 29, 2018 Share Posted October 29, 2018 Referring to following coding, I would like to know on why not able to add content into file. Does anyone have any suggestions? Thanks in advance for any suggestions #include <Array.au3> #include <File.au3> _FileTest() Func _FileTest() Local $sFilePath = "D:\stocks.txt" Local $hFileOpen = FileOpen($sFilePath, $FO_OVERWRITE) Local $string = "" Local $string1 = "Start 1" Local $string2 = "Start 2" $string = $string1 _ArrayConcatenate($string, $string2, 1) _FileWriteFromArray($sFilePath, $string, 1) FileClose($hFileOpen) Sleep(1000) Local $hFileOpen = FileOpen($sFilePath, $FO_APPEND ) $string1 = "Append 1" $string2 = "Append 2" $string = $string1 _ArrayConcatenate($string, $string2, 1) _FileWriteFromArray($sFilePath, $string, 1) FileClose($hFileOpen) Sleep(1000) ShellExecute($sFilePath) EndFunc Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted October 29, 2018 Share Posted October 29, 2018 @oemript As I was saying just yesterday, doing some error checking will help you debug your code. Don't start a new thread for each question you have, when you can find most of the answers in the Help file. By the way, if you did read the Help file more carefully about _ArrayConcatenate() function, you could see that you have to pass two arrays to the function, instead of two strings as you did. So, please, read the Help file carefully, and add error checking to your script. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
oemript Posted October 29, 2018 Author Share Posted October 29, 2018 (edited) Deleted Edited October 29, 2018 by oemript Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted October 29, 2018 Share Posted October 29, 2018 @oemript Did you look at your code? Did you look at _ArrayConcatenate() function in the Help file? What are you passing to the function? What is supposed to pass to the function? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette 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