GetExecutor(integer)
Description
Section titled âDescriptionâThe GetExecutor Lua function returns the handles of the executor and the page based on the executor number.
Arguments
Section titled âArgumentsâ- Integer:
The integer number for the executor.
- Handle - Executor:
The returned handle to the executor. - Handle - Page:
The returned handle to the page.
Example
Section titled âExampleâThis example stores the handles for executor number 201. It then uses the Dump() function to show the data for the two handles.
The Dump() function returns a string with information about the object, for instance, the name, class, path of the object, its properties, and children.
Learn more in the Dump() topic.
| Copy CodeLua |
| ``` |
| return function () |
-- This saves the handles for executor 201 on the selected page.local executorHandle, pageHandle = GetExecutor(201)-- exit the function and print an error message if any of the handles are nil.if executorHandle == nil or pageHandle == nil then ErrPrintf("There is not a valid object on executor 201, please assign something and try again.") returnend-- The following prints the dumps of the two handles.Printf("============ START OF EXEC DUMP =============")executorHandle:Dump()Printf("================ END OF DUMP ================")Printf("============ START OF PAGE DUMP =============")pageHandle:Dump()Printf("================ END OF DUMP ================")end