| grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » StrToHandle(string) | Version 2.2 |
StrToHandle 関数は、16進数文字列をハンドルに変換します。文字列は、実際のハンドルに関連付けられている必要があります。
ハンドルの詳細や関連関数については、ハンドル を参照してください。
選択されているシーケンスのハンドル番号を16進数文字列として出力します。また、この文字列をハンドルに変換し、これを用いてシーケンス名を出力します。
Lua |
return function() -- Store a variable with the string of the handle converted to hex local mySeqStr = HandleToStr(SelectedSequence()) -- Print some feedback with the handle in a string version Printf("The handle for the selected sequence (string version): %s", mySeqStr) -- Print some feedback where the string is converted back to a handle Printf("The name of the selected sequence is: %s", StrToHandle(mySeqStr).name) end |