Addr(handle[, handle[, boolean]])

grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object API » Addr(handle[, handle[, boolean]]) Version 2.2

説明

Addr 関数は、ハンドルをコマンドで使用できるアドレス文字列に変換します。

ハンドルの詳細や関連関数については、ハンドル を参照してください。

引数

  • handle:
    アドレス文字列を取得したいオブジェクトに対する light_userdata 型のハンドルです。オブジェクトでコロン記法を用いる場合は省略できます(以下の例を参照)。
  • handle (オプション):
    デフォルトでは、ルート位置からのアドレスが返されますが、このオプションのハンドルを用いると別のベース位置を指定できます。ルートからオブジェクトへのアドレスパスのベース位置である必要があります。
  • boolean | nil (オプション):
    This can be useful if there is a difference between the ToAddr() and Addr(). Setting this to "true" uses the index number from the ToAddr() instead of the Addr() index number. See the example below.

    The ToAddr() object function returns the address as a text string using names. Learn more in the ToAddr() topic.

  • boolean (オプション):
    In some edge cases, the cue address is not resolved correctly. Setting this boolean to true will fix this.

戻り値

  • string:
    ドットで区切られた親-子名形式のアドレス文字列を返します。

シーケンスのキューに対するアドレスを、さまざまな形で出力します。

Lua
return function()
-- Creates a cue in sequence 1
Cmd("Store Sequence 1 Cue 100 /Merge /NoConfirmation")
--Store a handle to the created cue
local cueObject = ObjectList("Sequence 1 Cue 100")[1]
--Print different version of the handle address
Printf("ToAddr: " .. cueObject:ToAddr())
Printf("Addr: " .. cueObject:Addr())
Printf("Addr(Parent, false, false): " .. cueObject:Addr(cueObject:Parent(), false, false))
Printf("Addr(Parent, true, false): " .. cueObject:Addr(cueObject:Parent(), true, false))
Printf("Addr(Parent, false, true): " .. cueObject:Addr(cueObject:Parent(), false, true))
Printf("Addr(Parent, true, true): " .. cueObject:Addr(cueObject:Parent(), true, true))
end