FromAddr(string[, handle])

Lua 関数の FromAddr は、番号付けまたは名前付けされたアドレスを、コマンドで使用できるハンドルに変換します。

引数

戻り値

この例では、最初のシーケンスのアドレスを出力しています。

local function main()
    local mySequenceHandle = FromAddr("13.13.1.5.1")           -- Converts the string to a handle and store in a variabel
    Printf("The address is: " ..mySequenceHandle:Addr())       -- Converts the handle back to a numbered string and prints it
    Printf("The address is: " ..mySequenceHandle:AddrNative()) -- Converts the handle to a named string and prints it
    
    local myDataPool = DataPool()  -- Store the handle of the selected datapool
    Printf(myDataPool:Addr())      -- Prints the address of the selected datapool
    
    -- The follwoing example uses the name of a sequence in the sequence pool. Please adjust the "Default" name in the next line to match an existing named sequence.
    local alsoMySequenceHandle = FromAddr("Sequences.Default", myDataPool) -- Finds the address based on the base location and a text string with names  
    Printf("The address is: " ..alsoMySequenceHandle:Addr())               -- Converts the handle back to a numbered string and prints it
    Printf("The address is: " ..alsoMySequenceHandle:AddrNative())         -- Converts the handle to a named string and prints it 
end

return main