Lua 関数の GetDisplayByIndex は、指定されたインデックス番号にマッチするディスプレイ・オブジェクトへのハンドルを返します。
この例では、ハンドルに関連するデータを、Dump() 関数を用いて出力しています。
return function()
-- Get the index number for "Display 1"
local displayIndex = GetDisplayCollect()["Display 1"].INDEX
-- Return an error text if the return should be nil
if displayIndex == nil then
ErrPrintf('Something went wrong. It appears that there is no "display 1"')
return
end
-- Dump all information about the display with the index number
Printf("=============== START OF DUMP ===============")
GetDisplayByIndex(displayIndex):Dump()
Printf("================ END OF DUMP ================")
end
GetDisplayCollect()["Display 1"]