Jump to content

Help with Array


Recommended Posts

Hi All,

Need some help, found this great thread and would like to use it with some help...

Hi there,

Love the idea of using a config.xml file... am having some trouble though (am new to autoit so am still learning)

I have created a config.xml file

<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
<CONFIG>
    <search>
        <path>f:\kids</path>
        <path>f:\movies</path>
    </search>
    <file>
        <ext>avi</ext>
        <ext>mkv</ext>
        <ext>wmv</ext>
    </file>
</CONFIG>

And a test autoit file

#include <_ConfigIO.au3>
$Conf_File=_Config_Open(@ScriptDir&"\config.xml")
$userConfig=_Config_Read($Conf_File, "search","path")


If not @error Then
MsgBox(0,"test output", $userConfig)
EndIf

What i am having trouble with is reading each of the lines in my config to i can use each in an array of some kind for further processing.

Can someone help me out here please?

Cheers!

Edited by Simplify iT
Link to comment
Share on other sites

You need to use _ConFig_EnumVal in a loop.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...