Jump to content

section names from inifle....


Aceguy
 Share

Recommended Posts

I would like to omit 1 section name from $recipie that this proc, recieved..

i.e. all except [charlie] then GUICtrlSetData($Recipie, $var[$i_n])

#include <GUIConstants.au3>
#include <GuiListView.au3>

Dim $IniFile = @DesktopDir & "\Recipes.ini"
$Form1 = GUICreate("test", 175, 475, 850, 150)
$Recipie = GUICtrlCreateCombo("", 10, 8, 155, 21)

$var = IniReadSectionNames($IniFile)
                For $i_n = 1 To $var[0]
                    GUICtrlSetData($Recipie, $var[$i_n])
                Next
                
                
;inifile look like this.......

;[aplha]
;[bravo]
;[charlie]
;[delta]
;[echo]
;[foxtrot]

please help............

Link to comment
Share on other sites

on a friends pc which does not have au3 so i can't test but why not add something like this after "For"

If $var[$i_n]="charlie" then ContinueLoop
Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

hmmm.....

#include <GUIConstants.au3>
#include <GuiListView.au3>

Dim $IniFile = @DesktopDir & "\Recipes.ini"
$Form1 = GUICreate("test", 175, 475, 850, 150)
$Recipie = GUICtrlCreateCombo("", 10, 8, 155, 21)

$var = IniReadSectionNames($IniFile)
                For $i_n = 1 To $var[0]
                    If $var[$i_n] <> "charlie" Then GUICtrlSetData($Recipie, $var[$i_n])
                Next
                
                
;inifile look like this.......

;[aplha]
;[bravo]
;[charlie]
;[delta]
;[echo]
;[foxtrot]

Edit: wtf pressing the spacebar is suddenly doing the same as enter...

Alzo

Edited by marfdaman

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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