AutoPlay Media Studio 9

Page.SetObjectScript

Page.SetObjectScript

This is the first topic This is the last topic  

Page.SetObjectScript

This is the first topic This is the last topic  

OverviewExamples

Page.SetObjectScript (

string ObjectName,

string EventName,

string Script )

Example 1

Page.SetObjectScript("Label1", "On Click", "-- Script removed by action");

Clears out the script from the "Label1" label object's On Click event and replaces it with a comment.

Example 2

-- Get the script from the button's on click event

sPreviousScript = Page.GetObjectScript("Button1", "On Click");

 

-- Initialize the new script

sNewScript = "Dialog.Message(\"Title\", \"Message\");"

 

-- Append the new script to the old script

Page.SetObjectScript("Button1", "On Click", sPreviousScript .. "\r\n" .. sNewScript);

Appends a dialog message action to the script existing on the On Click event of the "Button1" button object.

See also: Related Actions


Learn More: Indigo Rose Software - AutoPlay Media Studio - Buy Now - Contact Us