ToAddr(handle[, boolean])
Description
Section titled âDescriptionâ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.
Arguments
Section titled âArgumentsâ- Handle:
The function takes a handle of an object as an argument. - Boolean (optional):
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.
Example
Section titled âExampleâThis example prints the address of the selected sequence in both the numbered and named versions.
| Copy CodeLua |
| ``` |
| 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