OverviewExamples
table Screen.GetProperties ( |
) |
tScreenProperties = Screen.GetProperties();
Gets the properties from the current screen and stores them in table "tScreenProperties".
-- Initialize nButtons to zero
nButtons = 0;
-- Get the screen properties
tProps = Screen.GetProperties();
-- Traverse through the table, looking for buttons.
-- When one is found, add one to nButtons
for nIndex, Data in pairs(tProps.Controls) do
if Data.Type == 1 then
-- Item is a button
nButtons = nButtons + 1;
end
end
-- Output the button count to the user
Dialog.Message("Button Count", "There are " .. nButtons .. " buttons on this screen.");
Retrieves the properties from the current screen, stores them in table "tProps", and counts the number of buttons on the current screen. The result is displayed to the user as a message dialog.
See also: Related Actions