top of page
- API -

dofile(reaper.AZ_GetLuaInitPath())

require("reaper_AZSTOKE_SILVER")



t = {

tracks = {

{

track = "AZ1",

num = -21

},

{

track = "AZ2",

num = -25

},

{

track = "AZ3",

num = -24

}

}

}


Msg(t["tracks"][1].track)

Msg(t["tracks"][1].num)

jsonStr = reaper.AZ_Json_Serialize(t);

Msg(jsonStr)


tb = reaper.AZ_Json_Deserialize(jsonStr);


Msg(tb["tracks"][2].track)

Msg(tb["tracks"][2].num)

- API Detail-

- SCRIPT -

dofile(reaper.AZ_GetLuaInitPath())

require("reaper_AZSTOKE_SILVER")


・Support for making SILVER API available


t = {

tracks = {

{

track = "AZ1",

num = -21

},

{

track = "AZ2",

num = -25

},

{

track = "AZ3",

num = -24

}

}

}


・Create an array

*It is anticipated that this array can be created in a variety of ways.


Msg(t["tracks"][1].track)

Msg(t["tracks"][1].num)


・Check the first line of the array by outputting it to the console

jsonStr = reaper.AZ_Json_Serialize(t);

Msg(jsonStr)


・Convert the array to a string so that it can be saved as text


reaper.AZ_WriteFile("F://script//save","savedate.txt",jsonStr,0)


- Save jsonStr as savedate.txt in the specified folder.


tb = reaper.AZ_Json_Deserialize(jsonStr);


Convert jsonStr back into an array.

*This will allow you to retrieve the previous sequence as is.


Msg(tb["tracks"][2].track)

Msg(tb["tracks"][2].num)


Check if it is extracted

- SCRIPT -

File/Folder

AZSTOKE_TextFileWirteRead2

Save data construction Part 2 - Saving and using JSON format with array structure in mind -

01_BRONZE_ss_edited.png
01_SILVER_edited_edited.png
03_GOLD_edited_edited.png
bottom of page