|
|
|
02-28-2021, 08:07 AM
|
#1
|
Human being with feelings
Join Date: Oct 2014
Location: Belgium
Posts: 1,624
|
[SOLVED] How to Force to import a lua script by another lua script?
Suppose I have a script called aaa.lua and I want to import this script by running another script called bbb.lua, instead of to go manually on Actions > List actions > new actions >load ReaScript, blablabla.
Is it that possible?
Last edited by BartR; 03-01-2021 at 02:38 AM.
|
|
|
02-28-2021, 08:33 AM
|
#2
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
dofile("scriptname+path") maybe?
This will run the script "scriptname" inside your script and returns to your script afterwards.
This means also, that functions defined in scriptname will now be available in your script(except local functions, they might cause some trouble).
With that, you can build your own function's library that you can import into your script.
|
|
|
02-28-2021, 09:13 AM
|
#3
|
Human being with feelings
Join Date: Oct 2014
Location: Belgium
Posts: 1,624
|
Quote:
Originally Posted by Meo-Ada Mespotine
dofile("scriptname+path") maybe?
This will run the script "scriptname" inside your script and returns to your script afterwards.
This means also, that functions defined in scriptname will now be available in your script(except local functions, they might cause some trouble).
With that, you can build your own function's library that you can import into your script.
|
So, if I run into bbb.lua dofile("aaa.lua") once it has finished, if I go into Actions > Action list > and I looking for the script I will find it up there? Because this is my goal
|
|
|
02-28-2021, 09:21 AM
|
#4
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
|
|
|
02-28-2021, 09:27 AM
|
#5
|
Human being with feelings
Join Date: Oct 2014
Location: Belgium
Posts: 1,624
|
Quote:
Originally Posted by Meo-Ada Mespotine
|
That's worked PERFECTLY and I do like the fact it is fully explained.
It was just a matter of copy & paste and substitute the parameters with the correct ones.
AMAZING! Thank you so much
|
|
|
02-28-2021, 09:48 AM
|
#6
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
No problem
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 01:47 PM.
|