help with script » Egypt » Forum about travel in Ukraine
Forum about travel in Ukraine

Forum about travel in Ukraine



ПоискПоиск   Users   Registration   Entrance
Today: 28.06.2025 - 04:16:37
Pages:  1  

help with script

Advertising


AuthorMessage

chuck90m3

user




Statistics:
Messages: 750
Registration: 04.04.2003

Does anyone know how I could modify my script to set the source as a different sequential file each time the script is ran? So for examp. I have a directory with files named guitar_001 - guitar_100 and each time the script is ran it it should increment through the files. Note: This script requires REAPER pre. v5 and the sws extension. Code:

---------------------
"A casual stroll through the lunatic asylum shows that faith alone does not prove anything." Friedrich Nietzsche
Message # 1 09.01.25 - 08:27:11
RE: help with script

ledlum

user




Statistics:
Messages: 429
Registration: 03.01.2003

That seems possible, but you would have to split the path in several variables. Two will be fixed string (directory path + file name without number, and extension), and one will be an incrementable decimal variable. You mayd add conditions for adding 0 before the incrementation number if needed. Then, you mix all that together into string in an other variable in the proper order with the match function. I didnt try it, but this is what I would try. Do you more specific details (actual code example) or is it ok ?

---------------------
10 GTR R35 06 M5 04 330i zhp 93 318is 99 328i (Sold) 99 M3 Turbo (Sold)
Message # 2 09.01.25 - 08:31:41
RE: help with script

SDKCM3

user




Statistics:
Messages: 459
Registration: 06.12.2001

try this Code:

---------------------
Message # 3 09.01.25 - 08:39:07
RE: help with script

RayDuck

user




Statistics:
Messages: 291
Registration: 05.10.2001

I think we can go further with GetUserInput and 5 variables: Path Common prefix (guitar- guitar_ etc) Digit number (if your file is written as 0001 or 00001 for eg) Offset (if you want to start frm 0, 1 or 1724) Extension You would halso add conditions for missing file (error in file name) I'm not currently at home so I can't write it now ^^

---------------------
Message # 4 09.01.25 - 08:45:10
RE: help with script

RenegadeBMW

user




Statistics:
Messages: 881
Registration: 08.19.2003

Thanks heda, I tried your code and although it's not quite what I was looking for, it will come in handy for a different situation. What your code did was increment each item so I ended up with item1:guitar_001, item2:guitar_002.., etc. What I'm looking for is say all items start out as guitar_001, then the script is ran once, they should become guitar_002, then if the script is ran again they become guitar_003. So I guess what is need, which I didn't think about before is a separate file that stores the increment value, and when the script is ran each time it picks up the value from the file and stores the next value. Or another idea, is there any way to query/poll the keyboard via a defered script? So what happens is the script is continuously running and for example each time the keyboards 'x' key is pressed then the items are incremented. @X-Raym, I like your idea of the offset function, so yes please post when you get a chance. Thanks guys

---------------------
Click for more pics
Message # 5 09.01.25 - 08:51:13
RE: help with script

bmwpwr84

user




Statistics:
Messages: 263
Registration: 02.07.2003

ah.. sorry I did not understand it. Then. Instead of storing the variable in a file, you could use GetMediaItemTake_Source to get the current source of one of them. extract the number and add one to it and run the loop to all the items. edit: But maybe it is easier if this is done using takes in REAPER. Pressing the T key: "Take: Switch items to next take"

---------------------
06 X5 4.8is 99 M3 87 #184 325i chumpcar 96 318ti Sold 95 318ti Sold 88 Starion 68 Austin Healey - SCCA GP #84
Message # 6 09.01.25 - 09:02:16
RE: help with script
Толщина утеплителя для стен : Previous topic
Pages:  1  

The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants