Code Help File

Code Help File

Plugin Name:

Code

Current Version:

1.0.0.0

Description:

The Code Action Plugin allows for unconventional means of code manipulation by implementing a goto method as well as providing other functionality such as a UUID generation.

Licence:

GNU GPL v3

Author:

Centauri Soldier

Web:

www.AMSPublic.com

E-mail:

CentauriSoldier@AMSPublic.com

Copyright:

Copyright © 2009 AMSPublic.com

Install Notes:

Place the Code folder in your "AutoPlay Media Studio\Plugins\Action" folder.


Table of Contents

Code.GenerateUUID
Code.GetEventScript
Code.GetObjectScript
Code.GotScriptFileSection
Code.GotoEventLine
Code.GotoEventSection
Code.GotoObjectLine
Code.GotoObjectSection
Code.GotoScriptFileLine
Code.GotoScriptLine
Code.GotoScriptSection

Code.GenerateUUID


(string) Code.GenerateUUID ( 

(string) Prefix )

Description

Generates a Universally Unique Identifier.

Parameters

Prefix

(string) An additional string which is added before the UUID.

Note: Leave this blank or nil to exclude the prefix.

Returns

(string)
Returns a string containing the UUID.


Code.GetEventScript


(string) Code.GetEventScript ( 

(string) Page or Dialog = "Page1",

(string) Event = "On Show" )

Description

Gets the script from the specific event of a page or dialog.

Parameters

Page or Dialog

(string) The name of the page or dialog containing the script.

Event

(string) The event from which the code will be retrieved.

Returns

(string)
Returns a string containing the script from the specified page's/dialog's specific event.

If an error occurs then a blank string is returned.


Code.GetObjectScript


(string) Code.GetObjectScript ( 

(string) Object = "Button1",

(string) Event = "On Click" )

Description

Gets the script from the specific event of an object.

Parameters

Object

(string) The name of the object containing the script.

Event

(string) The event from which the script will be retrieved.

Returns

(string)
Returns a string containing the script from the specified object's specific event.

If an error occurs then a blank string is returned.


Code.GotScriptFileSection


Code.GotScriptFileSection ( 

(string) File = "C:\\Script.lua",

(string) Section = "MySection" )

Description

Executes the code in a script file from a declared section start point to the end of the section.

Note: Sections are declared in comments and use html/xml tag syntax.

Parameters

File

(string) The name of the file containing the script.

Section

(string) The name of the section of code to execute.

Returns

This action dose not return any value.


Code.GotoEventLine


Code.GotoEventLine ( 

(string) Page or Dialog = "Page1",

(string) Event = "On Show",

(number) Line = 5 )

Description

Executes the code in a page/dialog from a specific point onward.

Parameters

Page or Dialog

(string) The name of the page or dialog containing the script.

Event

(string) The name of the event in which the script will be executed.

Line

(number) The number of the line at which to begin execution of the script.

Returns

This action dose not return any value.


Code.GotoEventSection


Code.GotoEventSection ( 

(string) Page or Dialog = "Page1",

(string) Event = "On Show",

(string) Section = "MySection" )

Description

Executes the code in a page/dialog from a declared section start point to the end of the section.

Note: Sections are declared in comments and use html/xml tag syntax.

Parameters

Page or Dialog

(string) The name of the page or dialog containing the script.

Event

(string) The name of the event in which the script will be executed.

Section

(string) The name of the section of code to execute.

Note: See example for section syntax.

Returns

This action dose not return any value.


Example

--Put this in the On Show event
--<MySection>
Dialog.Message("Section Test", "This is a dialog box");
Dialog.Message("Section Test", "Here's another one");
--</MySection>
Dialog.Message("Section Test", "This one will not be executed when the biutton is clicked since it's not in the section");

--Put this on a button
Code.GotoEventSection("Page1", "On Show", "MySection");



Code.GotoObjectLine


Code.GotoObjectLine ( 

(string) Object = "Button1",

(string) Event = "On Click",

(number) Line = 5 )

Description

Executes the code in an object from a specific point onward.

Parameters

Object

(string) The name of the object containing the script.

Event

(string) The name of the event in which the script will be executed.

Line

(number) The number of the line at which to begin execution of the script.

Returns

This action dose not return any value.


Code.GotoObjectSection


Code.GotoObjectSection ( 

(string) Object = "Button1",

(string) Event = "On Click",

(string) Section = "MySection" )

Description

Executes the code in an object from a declared section start point to the end of the section.

Note: Sections are declared in comments and use html/xml tag syntax.

Parameters

Object

(string) The name of the object containing the script.

Event

(string) The name of the event in which the script will be executed.

Section

(string) The name of the section of code to execute.

Returns

This action dose not return any value.


Code.GotoScriptFileLine


Code.GotoScriptFileLine ( 

(string) File = "C:\\Script.lua",

(number) Line = 5 )

Description

Executes the code in a script file from a specific point onward.

Parameters

File

(string) The name of the file containing the script.

Line

(number) The number of the line at which to begin execution of the script.

Returns

This action dose not return any value.


Code.GotoScriptLine


Code.GotoScriptLine ( 

(variant) Script = sScript,

(number) Line = 5 )

Description

Executes the code in a script string from a specific point onward.

Parameters

Script

(variant) The name of the variable containing the script.

Line

(number) The number of the line at which to begin execution of the script.

Returns

This action dose not return any value.


Code.GotoScriptSection


Code.GotoScriptSection ( 

(variant) Script = sScript,

(string) Section = "MySection" )

Description

Executes the code in a script string from a declared section start point to the end of the section.

Note: Sections are declared in comments and use html/xml tag syntax.

Parameters

Script

(variant) The name of the variable containing the script.

Section

(string) The name of the section of code to execute.

Returns

This action dose not return any value.



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