Sodori Posted December 3, 2014 Share Posted December 3, 2014 I am trying to make a slave and a master system, however they are doing my head in! Look at these two, for some reason, PrintaPC works with this line: _FileReadToArray($file, $name, Default, ":") But Mother does not! Reasons, that I can tell, is because PrintaPC had nothing yet in the questions and return. Giving me an error 3 and if I activate "$FRTA_INTARRAYS" as it desires, it leaves blank arrays. Can someone explain? This is beyond my comprehension! Mother.txtPrintaPC.txt Link to comment Share on other sites More sharing options...
Moderators Solution Melba23 Posted December 3, 2014 Moderators Solution Share Posted December 3, 2014 Sodari,The Mother file has 2 trailing @CRLF - these are interpreted as lines which do not contain the delimiter and so the function fails as all lines do not have an equal number of parts. You can test this using the $FRTA_INTARRAYS and looking at the arrays contained within the returned array:#include <File.au3> #include <Array.au3> Local $aLines $sFile = @ScriptDir & "\Mother.txt" _FileReadToArray($sFile, $aLines, $FRTA_INTARRAYS, ":") _ArrayDisplay($aLines, "", Default, 8) ; Returned array of arrays _ArrayDisplay($aLines[0], "", Default, 8) ; Content of array within first element of returned array $sFile = @ScriptDir & "\PrintaPC.txt" _FileReadToArray($sFile, $aLines, Default, ":") _ArrayDisplay($aLines, "", Default, 8) ; Returned array as all lines have the delimiterSo you either have to remove the surplus @CRLF from the file or use the internal arrays. Please ask if you have any further questions. M23 Sodori 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Sodori Posted December 3, 2014 Author Share Posted December 3, 2014 I do have another question, but I think you are not the one to answer that; How to remove gremlins from your bloody PC? >.< I did notice them at first, and removed them promptly!! And yet, here they are. But they are not in my Mother file... I don't know. Been such a long day it seems! Ty Melba, you old creature! 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