faustf Posted November 29, 2019 Share Posted November 29, 2019 hi guys i have a list in txt with this mode 29 54,23 29 54,23 i want creat an array 2D , i use this script but i dont know why second result not send in correct box o_O #include <Array.au3> Local $aArrayOne_2D=FileReadToArray ("C:\Users\pc\Desktop\bookadd\tempfile.txt") Local $aArray2D[UBound($aArrayOne_2D)/2][2] Local $iLX = 0 Local $iLY = 0 For $i = 0 To UBound($aArrayOne_2D) - 1 $aArray2D[$iLX][$iLY] = $aArrayOne_2D[$i] If NOT Mod($i ,2) Then ;even If $iLY <> 0 Then $iLY-=1 $iLX+=1 Else ;odd $iLY+=1 EndIf _ArrayDisplay($aArray2D) Next Link to comment Share on other sites More sharing options...
Musashi Posted November 29, 2019 Share Posted November 29, 2019 27 minutes ago, faustf said: hi guys i have a list in txt with this mode 29 54,23 29 54,23 Could you PLEASE provide the corresponding text file (here : "tempfile.txt") as an attachment. It's a bit annoying to have to tinker this out of your text . "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
faustf Posted November 29, 2019 Author Share Posted November 29, 2019 tepfile.txt Link to comment Share on other sites More sharing options...
jchd Posted November 29, 2019 Share Posted November 29, 2019 @faustf you have enough posts here to be able to find how to code such a simple task by yourself. You really need to start learning by yourself. Local $a _FileReadToArray("tepfile.txt", $a, $FRTA_NOCOUNT) _ArrayDisplay($a) Local $b[(UBound($a) + 1) / 2][2] For $i = 0 To UBound($b) - 1 $b[$i][0] = $a[2 * $i] $b[$i][1] = $a[2 * $i + 1] Next $a = 0 _ArrayDisplay($b) Please try hard to stop begging spoonfeeding. Musashi 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
faustf Posted November 29, 2019 Author Share Posted November 29, 2019 thankz sorry i will try , also if sometime i loose my mind in a simple glas of water sorry again i will remember your suggest Link to comment Share on other sites More sharing options...
jguinch Posted November 29, 2019 Share Posted November 29, 2019 _Array1DTo2D Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF 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