vkrisz81 Posted September 9, 2014 Share Posted September 9, 2014 this is a HACK :DDDDD (how to cheat multidimensionalarrayintootherarray hack) -just because you see only hack in everything:D so here is an ini where i store records with 5 key-value pairs if i read it with inireadsection its ok, i prsent it with arraydispley, it shows there is an 5*2 array but, i cant attach it to an other array where i would like to store in a bigger array there are names, these are sectionnames in names there are datas, like age, address, etc etc how can i make a big array which store these data all? section name and key-value pairs in common array? tipically hacker/cheater questions.. isnt it? Link to comment Share on other sites More sharing options...
vkrisz81 Posted September 9, 2014 Author Share Posted September 9, 2014 again the "cheaterhackerpro guy" here is an example of this site: Local $arr[3]Local $a1[3] = [2, "a1-1","a1-2"]Local $a2[3] = [2, "a2-1","a2-2"]$arr[1] = $a1$arr[2] = $a2$arr[0] = 2Local $dumy For $i = 1 to $arr[0]$dumy = $arr[$i] For $j = 1 to $dumy[0] ConsoleWrite("$i:=" & $i & ", $dumy[" & $j & "]:=" & $dumy[$j] & @LF) NextNext so i want to type out the arr[1][1][1] but i cant.. why? arr[1] had been a multidimensional array by a1 what is a 2 dimensional array.. why or how can i call those values? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 9, 2014 Moderators Share Posted September 9, 2014 vkrisz81,Enough of the (very badly-done) sarcasm - and if you send me another PM such as the one I have just received you will get a posting holiday. As to this perfectly acceptable question - why not store the section data as arrays within a larger array? You can quite easily access the internal data: #include <Array.au3> ; Declare arrays holding the section data Local $aSection_1_Data[5][2] = [ _ ["Section_1_Key_1", "Section_1_Val_1"], _ ["Section_1_Key_2", "Section_1_Val_2"], _ ["Section_1_Key_3", "Section_1_Val_3"], _ ["Section_1_Key_4", "Section_1_Val_4"], _ ["Section_1_Key_5", "Section_1_Val_5"]] Local $aSection_2_Data[5][2] = [ _ ["Section_2_Key_1", "Section_2_Val_1"], _ ["Section_2_Key_2", "Section_2_Val_2"], _ ["Section_2_Key_3", "Section_2_Val_3"], _ ["Section_2_Key_4", "Section_2_Val_4"], _ ["Section_2_Key_5", "Section_2_Val_5"]] ; Declare a constainer array which contains the section arrays Local $aContainer[2] = [$aSection_1_Data, $aSection_2_Data] ; Then access the internal section arrays like this ; Entire array _ArrayDisplay($aContainer[0], "Section 1", Default, 8) ; Single elements - note () around $aContainer[#] part of the syntax MsgBox($MB_SYSTEMMODAL, "Section 2 - Pair 3", ($aContainer[1])[2][0] & " - " & ($aContainer[1])[2][1])However, if you wanted to modify the section data I would recommend extracting the internal array, changing the data and then reloading into the container. M23 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...
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