Jump to content

InireadSection


Recommended Posts

Hi,

To associate my things with the code you made, I had to make a very big array ([29][2]). There's alot of code on the same line. When I try to run Tidy, I get this error:

Is there a way to make my array on multiple line so I wont encounter this problem using Tidy?

You can break up long lines with an underscore ' _ ' character, like this:

Dim $avLongString[15] = ["1234567890", "1234567890", "1234567890", "1234567890", "1234567890", _
     "1234567890", "1234567890", "1234567890", "1234567890", "1234567890", "1234567890", "1234567890", _
     "1234567890", "1234567890", "1234567890"]

You'll have to fix the references to $avBmpAssoc[$n][0] and [$n][1] because the array will look like this (which is backwards from the earlier arrangement). But you can more easily make the association list arbitrarily large, yet still maintain it:

[0][0] = 3
[0][1] = 

[1][0] = "Home"
[1][1] = "1.bmp"

[2][0] = "Building"
[2][1] = "2.bmp"

[3][0] = "Flower"
[3][1] = "3.bmp"

:shocked:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

  • 3 weeks later...

I want that it put the numbers 0 to 50 before each association instead of the "S" & $avRead1[$n][0]

-------------------------------------------------------------------

I tried this but it doesnt work, it write only one value in my ini.

; Read the section
$avRead1 = IniReadSection(@ScriptDir & "\Config.ini", "Grid")
If @error = 0 And $avRead1[0][0] > 0 Then
    ; For each BMP file
    For $n = 1 To $avRead1[0][0]
        ; Find it's association
        For $a = 1 To $avBmpAssoc[0][0]
            If $avRead1[$n][1] = $avBmpAssoc[$a][0] Then
                ; Write the matching association out to an INI file
For $z = 0 to 50
                IniWrite(@ScriptDir & "\Config.ini", "Variables", $z, $avBmpAssoc[$a][1])
                ExitLoop
Next
            EndIf
        Next
    Next
Else
    MsgBox(16, "Error", "Error reading INI file.")
EndIf
oÝ÷ Ø&§Ê¡zZfy8ZKwÜ?êº^"ØbKaȬ­ʦy©ÚºÚ"µÍÈXYHÙXÝ[ÛÌÍØ]XYHH[TXYÙXÝ[ÛØÜ [È ][ÝÉÌLÐÛÛYË[I][ÝË  ][ÝÑÜY   ][ÝÊBYÜH[    ÌÍØ]XYVÌVÌH    ÝÈ[IÌÍÞHNÈÜXXÚT[BQÜ    ÌÍÛHHÈ  ÌÍØ]XYVÌVÌBBNÈ[]  ÌÎNÜÈÜÛØÚX][ÛBQÜ  ÌÍØHHHÈ ÌÍØ]ÜÛØÖÌVÌBBBRY   ÌÍØ]XYVÉÌÍÛVÌWHH    ÌÍØ]ÜÛØÖÉÌÍØWVÌH[BBBNÈÜ]HHX]Ú[ÈÜÛØÚX][ÛÝ]È[SH[^H[YHÈ[[Ü[Y[[È[XBBBR[]JØÜ   [È ][ÝÉÌLÐÛÛYË[I][ÝË  ][ÝÕXXÉ][ÝË    ÌÍÞ  ÌÍØ]ÜÛØÖÉÌÍØWVÌWJBBBBIÌÍÞ
ÏHBBBBQ^]ÛÜBBQ[YBS^S^[ÙBSÙÐÞ
M   ][ÝÑÜ][ÝË  ][ÝÑÜXY[ÈSH[K][ÝÊB[Y

Cheers!

:shocked:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...