Sign in to follow this  
Followers 0
Aceguy

section names from inifle....

4 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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  
Followers 0