|
grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » GetTopModal() |
Version 2.2 |
GetTopModal 関数は、最上位にあるモーダルのハンドルを返します。モーダルは、システムの通常操作を中断するポップアップの内部名です。モーダルは、開いている間、他のUI要素の使用をブロックします。
例えば、ウィンドウの設定ポップアップを開くときに、コマンドラインを使用することはできません。設定ポップアップはモーダルです。これは、UIの他の部分が開いている際に少し暗くなることでも識別できます。
この関数は、引数を受け取りません。
StagePopup 選択ポップアップに関する情報を、Dump() 関数で表示します。
Lua |
return function() -- Open a Modal / Pop-up. Cmd('Menu "StagePopup"') -- Add a small wait. coroutine.yield(0.5) -- Get the handle for the modal / pop-up. local modalHandle = GetTopModal() -- If there is a handle then dump all information else print en error feedback. if modalHandle ~= nil then Printf("=============== START OF DUMP ===============") modalHandle:Dump() Printf("================ END OF DUMP ================") else ErrPrintf("The Modal UI object could not be found.") end -- Close the modal / pop-up by pressing the Escape key. Keyboard(1,'press','Escape') Keyboard(1,'release','Escape') end |