07-09-2019, 12:14 AM
|
#1 |
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 858
|
Hi
I am just curious whether it is possible to auto execute a few scripts right at the start of the software ? Though i have made tabs for the Eugen's RR scripts but this would be one scenario where it could come in handy . regards zook |
|
|
07-09-2019, 01:08 AM
|
#2 |
|
Human being with feelings
Join Date: Oct 2016
Location: Spain
Posts: 332
|
Run action "SWS/S&M: Set global startup action" for any project, or "SWS/S&M: Set project startup action" for one project.
|
|
|
07-09-2019, 03:01 AM
|
#3 |
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,680
|
create a file "__startup.lua" in the "Scripts" folder.
This will be executed on start. Inside this script you can also call other scripts for example like this: Code:
reaper.Main_OnCommand(reaper.NamedCommandLookup("_RSe3ad1140dc733c3ccfe65a67ec53bfc634535821"), -1) --Run Track Inspector VIP
|
|
|
07-09-2019, 01:40 PM
|
#4 |
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 858
|
awesome yay !!
thanks a lot for helping out ![]() regards zook |
|
|
07-11-2019, 12:28 PM
|
#5 |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
@heda
What effect has setting the parameter flags to -1 in your code?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
|
|
07-11-2019, 03:14 PM
|
#6 | |
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,680
|
Quote:
![]() No idea... I can't remember why I put -1 instead of 0. I think that flag parameter is not used. It is not documented. |
|
|
|
07-16-2019, 11:51 AM
|
#7 |
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 858
|
|
|
|
07-17-2019, 07:59 AM
|
#8 |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
Geez, I had hope....
and there's a crying smiley missing in this forumssoftware...
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
|
|
07-17-2019, 10:17 AM
|
#9 |
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 858
|
the global startup SWS command worked flawlessly.
Is there a way to add more than one startup command as well ? zook |
|
|
07-17-2019, 10:24 AM
|
#10 |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
Only with one script, in which you add all the ones you want to load and running this script by SWS.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
|
|
07-17-2019, 11:03 AM
|
#11 |
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 858
|
Oh ok will do
|
|
|
07-17-2019, 01:09 PM
|
#12 |
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,680
|
I recommend the method of using the __startup.lua file instead of SWS. You can add as many actions in the lua file as needed. There is something with the SWS that sometimes wasn't working, at least running scripts, maybe for standard actions or custom actions is ok.
|
|
|
07-17-2019, 01:21 PM
|
#13 | |
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 858
|
ok i have no knowledge of coding at all but i tried this
made a new script _startup.lua then added this code, copying your code line and added the scripts Quote:
it is showing error . it was highlighting the bracket in red near the -2 and -3 can you help me with this ! regards zook Last edited by zookthespook; 07-17-2019 at 01:26 PM. |
|
|
|
07-17-2019, 01:40 PM
|
#14 |
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,680
|
try this
also notice that the file has to have two _ underscore characters... not one. "__startup.lua" I don't know why. Code:
reaper.Main_OnCommand(reaper.NamedCommandLookup("_RSe3ad1140dc733c3ccfe65a67ec53bfc634535821"), 0) --Run Track Inspector VIP
reaper.Main_OnCommand(reaper.NamedCommandLookup("_RS67fdf22be642a98b636a7c6eadf233e63b831d46"), 0) --Run Retrospective Record (MIDI)
reaper.Main_OnCommand(reaper.NamedCommandLookup("_RS6e7d8e039b636d070ecfcbf6bd71c3728658a741"), 0) --Run Retrospective Record (audio)
|
|
|
07-17-2019, 01:52 PM
|
#15 | |
|
Human being with feelings
Join Date: Mar 2015
Location: India Mumbai
Posts: 858
|
Quote:
![]() it worked it worked...you have taken me beyond "hello world" Really wan't to thank you for helping out here. this is going to be of great help ! regards zook |
|
|
|
10-03-2019, 08:30 AM
|
#16 |
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,608
|
Is this function only available in the latest build?
|
|
|
10-03-2019, 08:46 AM
|
#17 |
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
It's been there for at least a year.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :( Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate |
|
|
10-03-2019, 10:39 AM
|
#18 |
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,608
|
|
|
|
10-04-2019, 07:11 AM
|
#19 |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
__startup.lua and __startup.eel are in there for at least three years, probably longer.
We use it for our Ultraschall-extension for some years now. Main_OnCommand is available for even longer.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
|
|
06-24-2020, 10:58 AM
|
#20 |
|
Human being with feelings
Join Date: Apr 2014
Posts: 425
|
I'm wondering if there is a way to execute a script on EVERY projet load, including in new tab?
The __startup.lua script and SWS global startup option are calling script only on Reaper load and the SWS project startup option is project dependent. I would need something in the middle, something that execute a script for EVERY projets: existing ones, new ones, open in a tab or not. Thank you! |
|
|
06-25-2020, 08:28 AM
|
#21 | |
|
Human being with feelings
Join Date: Mar 2013
Posts: 6,235
|
Quote:
__________________
ReaLauncher |
|
|
|
06-25-2020, 09:13 AM
|
#22 | |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
Quote:
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
|
|
|
06-25-2020, 09:52 AM
|
#23 | |
|
Human being with feelings
Join Date: Apr 2014
Posts: 425
|
Quote:
2 reasons for this: - Because the option "copy media to project folder” failed to copy item pasted from an other Reaper project tab - Because I copy the files into specific folders depending of its purpose: "Imported", "Reference" and "Internal". That way, I can easily see what were my sources for a given session because they are isolated from the internal glueing/printing files and the reference files (used to compare previous audio assets with the one I need to design). So when I reopen a project where the files were managed that way I need to relink the items now offline with the copied source file now into the project folder. And I want that process to be streamlined, so I even don't think about it. Hope I was clear enough! :-) |
|
|
|
06-25-2020, 09:56 AM
|
#24 |
|
Human being with feelings
Join Date: Apr 2014
Posts: 425
|
Wow!
Very nice of you Mespotine! Actually I found that I can set a project startup action on a template project and that when saved as a new project it keeps the startup project action set via the SWS action. So using that system it works really well! Actually I have another question for you but it will be on another thread or maybe on the Reaper slack! :-) Cheers! |
|
|
07-24-2022, 06:12 AM
|
#25 |
|
Human being with feelings
Join Date: Sep 2021
Location: Berlin
Posts: 2,729
|
Reviving this, and the project template idea is also good, but here is an extension to run a script when any project loads.
__________________
ReaPack Repository: right-click and copy index URL |
|
|
09-28-2022, 10:06 AM
|
#26 |
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,784
|
I am experimenting with __start.lua
I have two scripts which have GUIs and are programmed to be docked when they are run. If I add one of these as the SWS Global Startup then it is loaded and docked and waits for user input. All as intended. If I put in __start/lua instead (having removed it from SWS Global) then, on start-up, it is loaded and docked. But its tab in the Docker is then selected and I have to click another tab to get the one I want. Is there any was to stop that script's tab being selected?
__________________
DarkStar ... interesting, if true. . . . Inspired by ... |
|
|
09-28-2022, 12:49 PM
|
#27 |
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,805
|
Instead of putting multiple scripts into one global script, you can use a simple native custom action and put all the scripts into that. I use it this way.
|
|
|
09-28-2022, 02:02 PM
|
#28 |
|
Human being with feelings
Join Date: Jan 2020
Location: In the studio at my desk
Posts: 563
|
I have been using the Start.lua for a few months now, but no matter how the script requests are oriented Track_Tags always take focus. I would prefer it to be HEDA TrackInsp
reaper.Main_OnCommand( reaper.NamedCommandLookup("_RSaea4bc032a8e5652fe85 818e22f6a1a1b38557f3"), 0) -- TRACK_TAGS reaper.Main_OnCommand( reaper.NamedCommandLookup("_RS5d05bf5141d15a2fac58 7ca059eadcb12277ff84"), 0) -- Fabian_MFXlist reaper.Main_OnCommand( reaper.NamedCommandLookup("_RS490460a16d7e7bb0285c cb1891b67f8f59593a61"), 0) -- QUCIK_ADDER reaper.Main_OnCommand( reaper.NamedCommandLookup("_RS5b8bf3e80fd3616513f9 eb382b4923402608cfc8"), 0) -- HeDa_TrackInsp Will the -1, -2 etc instead of , 0) resolve this? Thanks Warren |
|
|
09-29-2022, 04:06 AM
|
#29 | |
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,784
|
Quote:
![]() Oddly, I could not find the Custom Action (to remove it) nor where it is stored in the SWS ini files. I had to rename the SWS dll file, restart Reaper, delete the Custom Action, close Reaper, restore the SWS dll, restart Reaper. So it does not seem that I can run 2 scripts on startup without them both being focussed in the Dockers. I wonder what the second parameter in the reaper.Main_OnCommand() does; it is not documented.
__________________
DarkStar ... interesting, if true. . . . Inspired by ... |
|
|
|
09-29-2022, 05:16 AM
|
#30 |
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,805
|
I have 12 scripts starting up in the startup custom action. But only one of them is graphical, the rest is just deferred without ui.
|
|
|
![]() |
| Thread Tools | |
|
|