Jump to content

help with creating treeviews from INI


Recommended Posts

Hello, I'm trying to create a treeview from an INI based on the code from here: http://www.autoitscript.com/forum/index.php?showtopic=19071

The function there works very good, but i need some tips, to change it to my needs, since i would like to fill the following form with data:

Posted Image

as you can guess, it should become some sort of remote-installer/deployment-helper, based on INIs and CSVs, since i think that is least complicated. My problem basically is, that i don't want to rewrite the script, if i add a package. This should be done in a INI and then show up in the treeview. My structure for the INI was the following:

software.ini.txt

Like you probably guess, i would like to have lets say, the first section should hold the version (of the project) available, the second one holds the description to show if the project would be selected in the treeview. Now i have no clue how to link the INI-entrys to the Edit-Field or the Buttons (for installation/uninstallation/repair).

relevant parts of the AutoIt-Script are attached.

autoinst.au3

treeview.au3

"I teleported home one nightWith Ron and Sid and Meg.Ron stole Meggie's heart awayAnd I got Sidney's leg."- A poem about matter transference beams.

Link to comment
Share on other sites

so you get all the installing-stuff from your ini?

i've got an idea :lmao:

try to do your code from the ini-file in front or at the end of your treeviewitem

now you can read your install-/deinstall-path from your ini file using stringleft or stringright

here's an example

$1 = guictrlcreatetreeviewitem("002.0 nice prog", $tree); or $1 = guictrlcreatetreeviewitem($var[1][0] & " " & $var[1][1], $tree)
...
while 1
$msg = guigetmsg()
select
case $msg = $install
$view = stringleft (guictrlread(guictrlread($tree), 5))
run (iniread("the.ini"), "install", $view, "")
...
endselect
wend

hope that helps

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