Jump to content

Asign a number to a folder name listed in a .Ini file


izzy12
 Share

Recommended Posts

I have been trying to figure out how to change this to add a number to the folders listed in the GUICtrlCreateCombo

in a .INI file.

Global $List = GUICtrlCreateCombo(" ", 10, 40, 200); create first item

For $x = 1 To $FileList[0]

GUICtrlSetData($List, $FileList[$x], "|"); add other item send set a new default

Next

IniWriteSection(@ScriptDir & "\WL SETTINGS.ini", "List", $FileList[$x])

to something like this

example:

folder a = 1

folder b = 2

folder c = 3

ect....

thanks for the responce kaotkbliss

it works i just need it to look like the example. Sorry that i didn't did give a example of what i was looking for.

Edited by izzy12
Link to comment
Share on other sites

why not use the array number?

Global $List = GUICtrlCreateCombo(" ", 10, 40, 200); create first item

For $x = 1 To $FileList[0]

GUICtrlSetData($List, $x & ". " & $FileList[$x], "|"); add other item send set a new default

IniWrite(@ScriptDir & "\WL SETTINGS.ini", "List", $x, $FileList[$x])

Next

Removed the iniwritesection because if you are writing an array to to the ini, it needs to be a 2D array (array[key1][key2]) and yours is not.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

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...