ToAddr(handle[, boolean])

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

説明

The ToAddr Lua object-free function converts a handle to an address string that can be used in commands.

See the Handle topic for more info regarding handles, addresses, and links to other related functions.

引数

  • handle:
    The function takes a handle of an object as an argument.
  • boolean (オプション):
    This returns the address using the names instead of numbers. The default is False, which returns the number version of the address.

戻り値

  • string:
    String with the address value.

This example prints the address of the selected sequence in both the numbered and named versions.

Lua
return function ()
local mySequence = SelectedSequence()
-- Print the address to the selected sequence in number and name format.
Printf(ToAddr(mySequence))
Printf(ToAddr(mySequence, true))
end