INIPlus Help File

INIPlus Help File

Plugin Name:

INIPlus

Current Version:

1.2.2.0

Description:

A human-readable file format using some combined features of INI and XML.

Licence:

Free to use and distribute.

Author:

Centauri Soldier

Web:

www.AMSPublic.com

E-mail:

CentauriSoldier@AMSPublic.com

Copyright:

© 2009 www.AMSPublic.com

Install Notes:

Place the "INIPlus" folder in your "AutoPlay Media Studio\Plugins\Actions" folder


Table of Contents

INIPlus.CreateSection
INIPlus.CreateFromINI
INIPlus.ChangeSectionName
INIPlus.CopySection
INIPlus.CountSections
INIPlus.CountValues
INIPlus.DeleteSection
INIPlus.DeleteValue
INIPlus.ExportToINI
INIPlus.GetSectionAttribute
INIPlus.GetSectionNames
INIPlus.GetValue
INIPlus.GetValueAttribute
INIPlus.GetValueNames
INIPlus.ReadToTable
INIPlus.SectionDoesExist
INIPlus.SetSectionAttribute
INIPlus.SetValueAttribute
INIPlus.SetValueData
INIPlus.SetValueAttributeAndData
INIPlus.ShowErrors
INIPlus.ValueDoesExist

INIPlus.CreateSection


INIPlus.CreateSection ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf",

(string) Section = "Preferences",

(string) Attribute = "User Preferences" )

Description

(OPTIONAL) Although sections are created automatically when a value's attribute or data is specified, sometimes it is desirable to create blank sections. This function does just that.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The name of the section to create.

Attribute

(string) The section's attribute. This can be left blank.

Returns

This action dose not return any value.


INIPlus.CreateFromINI


INIPlus.CreateFromINI ( 

(string) INIPlus File = "AutoPlay\\Docs\\NewFile.ipf",

(string) INI File = "AutoPlay\\Docs\\OldFile.ipf" )

Description

Creates an INIPlus file from an INI file.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

INIPlus File

(string) The INIPlus file to create.

INI File

(string) The INI file to be copied.

Returns

This action dose not return any value.


INIPlus.ChangeSectionName


INIPlus.ChangeSectionName ( 

(string) File = "AutoPlay\\Docs\\MyFile.ipf",

(string) Old Name = "Old Section",

(string) New Name = "New Section" )

Description

Changes the name of an existing section.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Old Name

(string) The name of the existing section.

New Name

(string) The name to which the section will be changed.

Returns

This action dose not return any value.


INIPlus.CopySection


INIPlus.CopySection ( 

(string) File = "AutoPlay\\Docs\\MyFile.ipf",

(string) Old Section = "Old Section",

(string) Copied Section = "Copy Cat" )

Description

Copies an existing section with all attributes, values and value attributes to a new section.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Old Section

(string) The name of the existing section.

Copied Section

(string) The name to call the newly-copied section.

Returns

This action dose not return any value.


INIPlus.CountSections


(number) INIPlus.CountSections ( 

(string) File = "AutoPlay\\Docs\\MyFile.ipf" )

Description

Counts the number of sections and returns the number.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Returns

(number) Returns the number of sections in a INIPlus file. If an error occurs then -1 is returned.


INIPlus.CountValues


(number) INIPlus.CountValues ( 

(string) File = "AutoPlay\\Docs\\MyFile.ipf",

(string) Section = "My Section" )

Description

Counts the number of values in a given section and returns the number.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The section in which to count the values.

Returns

(number) Returns the number of values in a given section in an INIPlus file. If an error occurs then -1 is returned.


INIPlus.DeleteSection


INIPlus.DeleteSection ( 

(string) File = "AutoPlay\\Docs\\MyFile.ipf",

(string) Section = "My Section" )

Description

Deletes an existing section and all its values.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The name of the section to delete.

Returns

This action dose not return any value.


INIPlus.DeleteValue


INIPlus.DeleteValue ( 

(string) File = "AutoPlay\\Docs\\MyFile.ipf",

(string) Section = "My Section",

(string) Value = "My Value" )

Description

Deletes a value in a specifc section.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The section which contains the target value.

Value

(string) The value to delete.

Returns

This action dose not return any value.


INIPlus.ExportToINI


INIPlus.ExportToINI ( 

(string) INIPlus File = "AutoPlay\\Docs\\OldFile.ipf",

(string) INI File = "AutoPlay\\Docs\\NewFile.ini",

(boolean) Include Attributes = true )

Description

Exports all data in an INIPlus file and write it to an ini file. All attributes can be included as comments in the new ini file.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

INIPlus File

(string) The INIPlus file to be copied.

INI File

(string) The ini file to create.

Include Attributes

(boolean) Whether or not to include the all attributes in the INIPlus file as comments in the new INI file.

Returns

This action dose not return any value.


INIPlus.GetSectionAttribute


(string) INIPlus.GetSectionAttribute ( 

(string) File = "AutoPlay\\Docs\\MyFile.ipf",

(string) Section = "My Section" )

Description

Retrieves the attribute of the given section.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The name of the section whose attribute to get.

Returns

(string) A string containing the attribute. If there is no attribute or an error occurs then a blank string ("") is returned.


INIPlus.GetSectionNames


(table) INIPlus.GetSectionNames ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf" )

Description

Gets the names of all sections and returns them in a numerically indexed table.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Returns

(table) A numerically indexed tables whose values are the sections names.


INIPlus.GetValue


(string) INIPlus.GetValue ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf",

(string) Section = "My Section",

(string) Value = "My Value" )

Description

Gets the data of a given value.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The section which contains the value where the target data is stored.

Value

(string) The value which contains the target data.

Returns

(string) A string containing the value's data. If there is no data or an error occurs then a blank string ("") is returned.


INIPlus.GetValueAttribute


(string) INIPlus.GetValueAttribute ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf",

(string) Section = "My Value",

(string) Value = "My Value" )

Description

Gets the attribute of a given value.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The section which contains the value where the target attribute is stored.

Value

(string) The value which contains the target attribute.

Returns

(string) A string containing the value's attribute. If there is no attribute or an error occurs then a blank string ("") is returned.


INIPlus.GetValueNames


(table) INIPlus.GetValueNames ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf",

(string) Section = "My Section" )

Description

Get all value names from a specified section and returns them in a numerically indexed table.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The section in which to count values.

Returns

(table) A numerically indexed tables whose values are the value names.


INIPlus.ReadToTable


(table) INIPlus.ReadToTable ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf" )

Description

Reads the contents of an INIPlus file and returns a table containing two sub tables.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Returns

(table) Returns a table containing two sub tables. If no data exists or an error occurs then nil is returned.

The first table is indexed by section and value names.

tData["My Section"].ID
tData["My Section"].Name
tData["My Section"].Attribute
tData["My Section"].Values["My Value"].ID
tData["My Section"].Values["My Value"].Name
tData["My Section"].Values["My Value"].Attribute
tData["My Section"].Values["My Value"].Data

The second table is indexed by numbers but contains the same data as the first table.

tData[1].ID
tData[1].Name
tData[1].Attribute
tData[1].Values[1].ID
tData[1].Values[1].Name
tData[1].Values[1].Attribute
tData[1].Values[1].Data


INIPlus.SectionDoesExist


(boolean) INIPlus.SectionDoesExist ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf",

(string) Section = "My Section" )

Description

Determines whether or not a section exists.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The section for which to search.

Returns

(boolean) Returns true if a section exists and false if a section does not. If an error occurs then nil is returned.


INIPlus.SetSectionAttribute


INIPlus.SetSectionAttribute ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf",

(string) Section = "My Section",

(string) Attribute = "Some text here" )

Description

Set or changes the the attribute of a given section. If the section does not exist it will be created.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The section in which to set the attribute.

Attribute

(string) The attribute text.

Returns

This action dose not return any value.


INIPlus.SetValueAttribute


INIPlus.SetValueAttribute ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf",

(string) Section = "My Section",

(string) Value = "Some text here",

(string) Attribute = "Some text here" )

Description

Set or changes the attribute of a given value. If the section or value does not exist then it will be created.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The section which contains the value for which to set the attribute.

Value

(string) The value for which to set the attribute.

Attribute

(string) The attribute text.

Returns

This action dose not return any value.


INIPlus.SetValueData


INIPlus.SetValueData ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf",

(string) Section = "My Value",

(string) Value = "My Value",

(string) Data = "Some text here" )

Description

Set or changes the data of a given value. If the section or value does not exist then it will be created.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The section which contains the value for which to set the data.

Value

(string) The value for which to set the data.

Data

(string) the data text. This can be multi-line.

Returns

This action dose not return any value.


INIPlus.SetValueAttributeAndData


INIPlus.SetValueAttributeAndData ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf",

(string) Section = "My Section",

(string) Value = "My Value",

(string) Attribute = "Attribute Text",

(string) Data = "Data Text" )

Description

Set or changes the attribute and data of a given value. If the section or value does not exist then it will be created.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The section which contains the value for which to set the attribute and data.

Value

(string) The value for which to set the attribute and data.

Attribute

(string) The attribute text.

Data

(string) The data text.

Returns

This action dose not return any value.


INIPlus.ShowErrors


INIPlus.ShowErrors ( 

(boolean) Show Errors = false )

Description

Set this to true to see any occuring erros with INIPlus actions.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

Show Errors

(boolean) Whether or not to show errors created by syntax problems in INIPlus functions. This is good for trouble shooting.

Returns

This action dose not return any value.


INIPlus.ValueDoesExist


(boolean) INIPlus.ValueDoesExist ( 

(string) File = "AutoPlay\\Docs\\NewFile.ipf",

(string) Section = "My Section",

(string) Value = "My Value" )

Description

Determines whether or not a value exists.

Note: The INIPlus format IS case sensitive. The escape character (for manually editing an INIPlus file) is a carrot "^". Comments can placed anywhere outside of sections but must still escape with a carrot "^" when using function symbols ([, ], <, >, |, =, ", ')

Parameters

File

(string) The INIPlus file to access.

Section

(string) The section which contains the target value.

Value

(string) The value for which to search.

Returns

(boolean) Returns true if a value exists and false if it does not. If an error occurs then nil is returned.



© 2009 www.AMSPublic.com
This File Was Generated With AMS ActionFile Editor