Jump to content

Recommended Posts

Posted

How would I export just my INI values that looks like this:

[section]

key=value1,value2,value3

to a text format that looks like this:

value1

value2

value3

...

[center]See the Helpfile[/center]

While Alive()
	 DrinkWine();
}
[center][/center]
Posted

use

IniReadSection ( "filename", "section" )



            
        

        

        
            

    
        

        
            [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock
        
    

        
    

    
    

    

                    
                    
                        
                    
                    
                

                    

                    
                    






    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


FireLord
            
            
                Posted 
                
            
        
    
    
        


FireLord
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 139
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                        Author
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
           
           Posted 
           
            
            
                
                
            
        
    

    

    

    
        
        
            export to where.?Just export it to a text file on my desktop.


            
        

        

        
            

    
        

        
            
[center]See the Helpfile[/center]
While Alive()
     DrinkWine();
}
[center][/center]
Posted

use

IniReadSection ( "filename", "section" )

If I did INIReadSection and "somehow" exported to a text file it probably wouldn't be in the right format.

[center]See the Helpfile[/center]

While Alive()
	 DrinkWine();
}
[center][/center]
Posted

try this

#include<Guiconstants.au3>
#include<array.au3>

Dim $IniFile = @MyDocumentsDir & "\test.ini"
dim $Export_file = @MyDocumentsDir & "\Export.txt"

$Var=IniReadSection($IniFile,"test")
FileOpen($Export_file,2)

for $i = 1 to $var[0][0]
    $split=StringSplit($var[$i][1],",")
    for $j =1 to $split[0]
    FileWriteLine($Export_file,$split[$j])
Next
Next

sleep(1000)
FileClose($Export_file)

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
×
×
  • Create New...