top of page
- API -

dofile(reaper.AZ_GetLuaInitPath())

require("reaper_AZSTOKE_SILVER")


fileName = "saveDate.txt"


folderPath,addPath = reaper.AZ_SetResoucePathFolder("AZSTOKE",0)

retval,inputList = reaper.AZ_GetUserInputList("Info",3,"Path:,Wav:,Count:","D:/,test,5")


if retval then

saveText = ""

for i, value in pairs(inputList) do

if i == 1 then

saveText = value

else

saveText = saveText..","..value

end

end

reaper.AZ_WriteFile(folderPath,fileName,saveText,0)

saveText = reaper.AZ_ReadFile(folderPath,fileName)

splitList = reaper.AZ_GetStringSplitList(saveText,",")

for i, value in pairs(splitList) do

Msg(splitList[i])

end

end

- API Detail-

- SCRIPT -

dofile(reaper.AZ_GetLuaInitPath())

require("reaper_AZSTOKE_SILVER")


・Enable use of SilverAPI


fileName = "saveDate.txt"


- Add the file name and extension and assign the string "saveDate.txt" to fileName


folderPath,addPath = reaper.AZ_SetResoucePathFolder("AZSTOKE",0)


・Create a folder called "AZSTOKE" in the resource folder


retval,inputList = reaper.AZ_GetUserInputList("Info",3,"Path:,Wav:,Count:","D:/,test,5")


- Set three pieces of input information in UserInput, and assign the input information to inputList after execution.


if retval then


・If GetUserInputList is not canceled


saveText = ""


・Prepare an empty saveText


for i, value in pairs(inputList) do


・Loop playback for inputList


if i == 1 then

saveText = value


・At first, assign the value directly to saveText


else

saveText = saveText..","..value


・From the second time onwards, insert a "," as a separator in saveText and then add the value to the end and assign it


end

end

reaper.AZ_WriteFile(folderPath,fileName,saveText,0)


- Create a file containing saveText in the specified folder path


saveText = reaper.AZ_ReadFile(folderPath,fileName)


・Read the file you just created and output it to saveText


splitList = reaper.AZ_GetStringSplitList(saveText,",")


・Change to an array based on the separator of saveText


for i, value in pairs(splitList) do


- Loop playback for each splitList


Msg(splitList[i])


-Console output for each splitList, check if output is done


end

end

- SCRIPT -

File/Folder

AZSTOKE_TextFileWirteRead

Save data construction Part 1 - Exporting and importing text files -

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