Old 05-24-2015, 05:49 AM   #1
pangrawit
Human being with feelings
 
pangrawit's Avatar
 
Join Date: May 2015
Posts: 4
Default How to run a script on every Reaper startup

Hi,

It seems a most simple question to me, but I couldn't find the answer.

>>>
So hello to everyone! I've been a regular visitor here for many months now. I've found tons of answers without even having to ask questions, so thank you all for your excellent work!
<<<

So now that's what I want to do:
I have an EEL script loaded into my actions list. I can select it and hit run and it works. But only until I close Reaper. When I reopen I have to run it again. I want it to run automatically when I start Reaper. How do I do it?

Many thanks!
Jacek
pangrawit is offline   Reply With Quote
Old 05-24-2015, 07:09 AM   #2
lachrimae
Human being with feelings
 
lachrimae's Avatar
 
Join Date: May 2010
Location: Austin, TX
Posts: 786
Default

Hey Jacek,

This ability is included in SWS Extensions and is called Project Startup Action. Have a look in your extensions menu (assuming SWS is installed).

I think you can only specify a single script so if you need to run more than 1 on startup you'd need to combine them (I could be wrong).
lachrimae is offline   Reply With Quote
Old 05-24-2015, 07:12 AM   #3
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,296
Default

Yes you can combine them in a custom action.

I would love also a global startup action, that runs when REAPER starts, not project specific.
__________________
HeDaScripts for REAPER
heda is offline   Reply With Quote
Old 11-14-2015, 02:49 AM   #4
pangrawit
Human being with feelings
 
pangrawit's Avatar
 
Join Date: May 2015
Posts: 4
Default

Thanks guys!
The SWS feature works great.
But I actually meant what Heda means - running scripts at Reaper startup. Or perhaps including scripts in default new project settings.
Any news on that?
pangrawit is offline   Reply With Quote
Old 11-14-2015, 03:17 AM   #5
EricM
Human being with feelings
 
EricM's Avatar
 
Join Date: Jul 2009
Location: Ljubljana, Slovenia
Posts: 3,801
Default

Here's a solution:

http://forum.cockos.com/showpost.php...1&postcount=13

Best,
e
__________________
Shoelace 4 Theme | SoundCloud/erXon
EricM is offline   Reply With Quote
Old 11-24-2015, 03:21 PM   #6
pangrawit
Human being with feelings
 
pangrawit's Avatar
 
Join Date: May 2015
Posts: 4
Default

Runs great.
Thanks!
pangrawit is offline   Reply With Quote
Old 11-25-2015, 03:13 AM   #7
drew
Mobile
 
drew's Avatar
 
Join Date: Jan 2006
Location: London & São Paulo. Hardcore commercial REAPERite
Posts: 1,643
Default

Unless I am missing something, that solution (with default project template) will only work if every project already has it and if you ever decide to stop using it, all your projects will still try to run it.

I appreciate it's given as a workaround, but is still quite different from 'when REAPER starts, run an action' (which could easily be changed globally, rather than requiring all projects to be reconfigured).
__________________
Proudly using REAPER exclusively for professional music production at Qsonics.com and recording broadcast and narrative voiceovers at DrewWhite.com.
drew is offline   Reply With Quote
Old 11-25-2015, 10:10 AM   #8
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Location: Sholder, Kentucky
Posts: 1,889
Default

my problem with the proposed solution is that my script is meant to run indefinitely, so it works great when I launch reaper and the default project is run... but then when I create a new tab, the script runs again and turns itself off like a toggle.
mccrabney is offline   Reply With Quote
Old 11-25-2015, 12:08 PM   #9
beingmf
Human being with feelings
 
beingmf's Avatar
 
Join Date: Jul 2007
Location: Jazz City
Posts: 3,921
Default

May I ask what (kind of) script this is? Slightly OT, but I'm always interested how other users customize their Reaper setups.
__________________
Windows 7x64 SP1 | NVidia Quadro2000, 10.18.13.6191 | Marian Seraph AD2, 4.0.2.1
Experience the Blunzeworscht!
beingmf is offline   Reply With Quote
Old 11-25-2015, 12:45 PM   #10
lachrimae
Human being with feelings
 
lachrimae's Avatar
 
Join Date: May 2010
Location: Austin, TX
Posts: 786
Default

Mine is Heda's auto-record mode
http://reaper.hector-corcin.com/
lachrimae is offline   Reply With Quote
Old 11-30-2015, 02:57 AM   #11
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,969
Default

I'll add a "global" startup action in SWS (in addition to the "per-project" startup action)
Jeffos is offline   Reply With Quote
Old 11-30-2015, 03:09 AM   #12
EricM
Human being with feelings
 
EricM's Avatar
 
Join Date: Jul 2009
Location: Ljubljana, Slovenia
Posts: 3,801
Default

Quote:
Originally Posted by Jeffos View Post
I'll add a "global" startup action in SWS (in addition to the "per-project" startup action)
nice Jeff :>

e
__________________
Shoelace 4 Theme | SoundCloud/erXon
EricM is offline   Reply With Quote
Old 11-30-2015, 07:30 AM   #13
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,928
Default

Quote:
Originally Posted by Jeffos View Post
I'll add a "global" startup action in SWS (in addition to the "per-project" startup action)
You rock, Jeffos. Thank you.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 11-30-2015, 08:02 AM   #14
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Germany
Posts: 835
Default

Quote:
Originally Posted by Jeffos View Post
I'll add a "global" startup action in SWS (in addition to the "per-project" startup action)
Wow, brilliant!!! Thank you, JeffOS
timothys_monster is offline   Reply With Quote
Old 11-30-2015, 09:34 AM   #15
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,296
Default

excellent news
__________________
HeDaScripts for REAPER
heda is offline   Reply With Quote
Old 12-01-2015, 11:27 AM   #16
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Location: Sholder, Kentucky
Posts: 1,889
Default

thanks a million, jeffos.

Quote:
May I ask what (kind of) script this is? Slightly OT, but I'm always interested how other users customize their Reaper setups.
it's a script that watches to see if i've changed tabs, and if i do, it "wiggles" some specific ReaControlMidi params to set some external midi equipment to the project values so that i don't have to change presets manually. right now, calling it twice acts as a on/off toggle which is undesirable. having it run via program action negates the issue as it would just bceome a "fact" of reaper.
mccrabney is offline   Reply With Quote
Old 09-27-2016, 11:50 AM   #17
radekdolezi
Human being with feelings
 
Join Date: Jul 2016
Posts: 47
Default

SWS set global stratup action works great - but ... how to set more than one action? It looks like mission impossible that way :-(
radekdolezi is offline   Reply With Quote
Old 09-27-2016, 12:22 PM   #18
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 2,684
Default

Quote:
Originally Posted by radekdolezi View Post
SWS set global stratup action works great - but ... how to set more than one action?
Create a REAPER custom action containing all desired actions and assign that as SWS global startup action.
cfillion is offline   Reply With Quote
Old 09-26-2018, 04:40 AM   #19
earhax
Human being with feelings
 
Join Date: Nov 2015
Posts: 172
Default

I just wanted to say THANK YOU SO MUCH for adding this global startup action. I've been tearing my hair out needing to set a number of cycle actions I use to the "on" state every time I start REAPER. But thanks to this, NO MORE! They all turn on automatically. Hooray!
earhax is offline   Reply With Quote
Old 09-26-2018, 08:07 AM   #20
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,396
Default

For completeness:

Reaper also supports a special-script called __startup.lua or __startup.eel, depending on the language you are using.
If you put one or both of them into the scripts-folder, they will be run at startup, even if they are not registered as scripts, with the __startup.eel first and __startup.lua second.

Important: the script has two underscores at the beginning!

With that, a lot is possible in "standard"-Reaper at startup as well.
mespotine is offline   Reply With Quote
Old 10-01-2018, 06:46 AM   #21
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 268
Default

Quote:
Originally Posted by mespotine View Post
Reaper also supports a special-script called __startup.lua or __startup.eel
Thanks for the info!)
Ivannn Bennnettt is offline   Reply With Quote
Old 03-25-2019, 11:27 AM   #22
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 375
Default

Quote:
Originally Posted by mespotine View Post
For completeness:

Reaper also supports a special-script called __startup.lua or __startup.eel, depending on the language you are using.
If you put one or both of them into the scripts-folder, they will be run at startup, even if they are not registered as scripts, with the __startup.eel first and __startup.lua second.

Important: the script has two underscores at the beginning!

With that, a lot is possible in "standard"-Reaper at startup as well.
Can you explain to me how this is better than SWS Global Action? I'm just always looking for ways to improve my workflow.
__________________
MP 12 Core 3.46GHZ 48GB OSX10.11.6, MBP 15" 2012 OSX10.12, RME Fireface UFX, MCU,
Reaper 5, SD2, Omnisphere, Wave Altiverb, PSP, VB3, Izotope, Scuffham, Soundtoys 5, Slate All Plugins.
lexaproductions is offline   Reply With Quote
Old 03-25-2019, 01:04 PM   #23
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,078
Default

- Doesn't require SWS, for the few people who won't/can't install it.
- It's a script, rather than a Reaper action, so it's able to do a lot more if you need it to.
Lokasenna is offline   Reply With Quote
Old 08-03-2019, 06:43 PM   #24
babag
Human being with feelings
 
Join Date: Nov 2009
Posts: 1,627
Default

edit: found example. very helpful. heda gives examples and useful discussion.:

https://forum.cockos.com/showthread.php?t=222833

end edit

is there an example script someplace for this so i could see how exactly to write it up? i'm sure it's very simple.

thanks,
babag

Last edited by babag; 08-03-2019 at 07:08 PM.
babag is offline   Reply With Quote
Old 08-04-2019, 03:01 AM   #25
Skorobagatko
Human being with feelings
 
Skorobagatko's Avatar
 
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 86
Default

I wonder, how can I setup startup action with a script (for example KAWA Clock) already docked when launching Reaper, is it possible somehow?
Skorobagatko is online now   Reply With Quote
Old 08-06-2019, 07:43 AM   #26
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,396
Default

Quote:
Originally Posted by Skorobagatko View Post
I wonder, how can I setup startup action with a script (for example KAWA Clock) already docked when launching Reaper, is it possible somehow?
What do you mean? Do you mean, how a script can change the __startup.lua? Or how to change, what the __startup.lua is starting as actions when run?
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 08-09-2019, 02:00 AM   #27
Skorobagatko
Human being with feelings
 
Skorobagatko's Avatar
 
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 86
Default

Quote:
Originally Posted by mespotine View Post
What do you mean? Do you mean, how a script can change the __startup.lua? Or how to change, what the __startup.lua is starting as actions when run?
Script opens floating on startup, but I want it to be docked. So I need to click on it and select "dock" this window each time.
Skorobagatko is online now   Reply With Quote
Old 08-09-2019, 02:05 AM   #28
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,928
Default

I would 'wrap' the script in a custom action and add an action to dock the last toolbar. (I'm pretty sure those actions exist)
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 08-09-2019, 02:23 AM   #29
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,296
Default

Quote:
Originally Posted by Skorobagatko View Post
Script opens floating on startup, but I want it to be docked. So I need to click on it and select "dock" this window each time.
It depends on the script to restore last position or docker when initializing and save the position and docker when exiting.
__________________
HeDaScripts for REAPER
heda is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.