- Script Code -
dofile(reaper.AZ_GetLuaInitPath())
require("reaper_AZSTOKE_SILVER")
token = "----"
user = "----"
canselType,inputList = reaper.AZ_GetUserInputList("wav",1,"path:","")
if canselType then
fileList = reaper.AZ_GetFilePathList(inputList[1],"wav")
track = reaper.AZ_GetTrackItemSelect(0,0,1)
startPos = 0
for i, value in pairs(fileList) do
item = reaper.AZ_InsertMediaTrackItemSecond(track,value,0,startPos)
reaper.AZ_SetMediaItemHANDAUTOMER(item,2)
endTime = reaper.AZ_GetMediaItemEndTime(item)
startPos = endTime + 1
end
reaper.AZ_Slack_PostDirectMessage(token,user,"HANDAUTOMER作業が終了しました。",true,true)
end
- Warm Up -
- Generate and select the tracks you want to import media from.
- Prepare a folder with the media you want to import.
- Create a SLACK bot *Procedures for creating a SlackBot
- Script Detail -
dofile(reaper.AZ_GetLuaInitPath())
require("reaper_AZSTOKE_SILVER")
・Enable SILVER API
token = "----"
user = "----"
・Set up token and user information.
*This is configured differently for each Slack.
canselType,inputList = reaper.AZ_GetUserInputList("wav",1,"path:","")
・Enter path information in the text box
if canselType then
・Press OK in the text box to execute the following process
fileList = reaper.AZ_GetFilePathList(inputList[1],"wav")
・Get full path information of wav data from path information
track = reaper.AZ_GetTrackItemSelect(0,0,1)
・Get the first of the selected tracks
startPos = 0
・Set media installation seconds
for i, value in pairs(fileList) do
・Loop over the number of wav files
item = reaper.AZ_InsertMediaTrackItemSecond(track,value,0,startPos)
・Insert media at a specified location on a specified track item
reaper.AZ_SetMediaItemHANDAUTOMER(item,2)
・Execute HANDAUTOMER on specified media
endTime = reaper.AZ_GetMediaItemEndTime(item)
・Obtains the end position of the specified media
startPos = endTime + 1
・Set start time 1 second after media end time
end
reaper.AZ_Slack_PostDirectMessage(token,user,"HANDAUTOMER work has been completed.",true,true)
・Send finished to slack
end
- API LINK -
Slack
AZSTOKE_Slack_call_1
Slack notification after HANDAUTOMER execution


