Jump to content
Sign in to follow this  
TuMiM

Button based on ini

Recommended Posts

TuMiM

I am trying to create a script that generates a gui with 6 buttons based on the ini. Each button has a section in the ini. If you click on a button, i need it to launch mdi files depending on how many are in the ini. I know i can create a run command for each file but is there a way to have to it run through the ini and run each command based on what is there? (I know a little confusing). I attached the code i have now to give an idea but it is only based on one file being opened as oppsed to 6 per button

LogLaunch1.au3

LogLaunch.ini.txt

Share this post


Link to post
Share on other sites
Szhlopp

I am trying to create a script that generates a gui with 6 buttons based on the ini. Each button has a section in the ini. If you click on a button, i need it to launch mdi files depending on how many are in the ini. I know i can create a run command for each file but is there a way to have to it run through the ini and run each command based on what is there? (I know a little confusing). I attached the code i have now to give an idea but it is only based on one file being opened as oppsed to 6 per button

I haven't downloaded or looked into your code. However, what you're asking should look something like this:

$Sections = IniReadSectionNames($File)
 For $I = 0 To UBound($Sections) - 1
    $Read = IniRead($File, $Sections[$I], "MyCommandKey", "-1")
Next

$Read will now have the 'CommandKey' in each section. So that way, you can just test what $Read equals and do something off of it >_<

Share this post


Link to post
Share on other sites
TuMiM

interesting, the command to launch is in the code. The ini just holds the variables for the path. Not sure how that would work

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.