|
|
|
07-12-2017, 04:16 AM
|
#1
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,451
|
List of all running scripts in the background?
Is there a way to find out all the running (deferred) scripts?
Thanks!
|
|
|
07-12-2017, 04:01 PM
|
#2
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
Not possible as far as I know, but it could be nice to have.
|
|
|
07-13-2017, 04:37 AM
|
#3
|
Human being with feelings
Join Date: Oct 2016
Location: Spain
Posts: 323
|
In Actions List, click on "State" and all actions will be ordered by state. First the "no state" actions, after the "off" actions, and finally the "on" actions. Click on "State" again and the order turns.
|
|
|
07-13-2017, 05:27 PM
|
#4
|
Human being with feelings
Join Date: Jun 2012
Posts: 2,173
|
For me, they show up in the Actions Menu like
Running script: blabla.lua
Running script: foo.lua
but I only use a few.
|
|
|
07-15-2017, 11:07 AM
|
#5
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,451
|
FnA, that's it! Thanks!
|
|
|
05-15-2018, 08:53 PM
|
#6
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
(sorry for bumping)
I can`t see in Action List running ReaScripts. I have almost always running multiple reascripts, and none of them are displayed as "Running ReaScript" in action list. However, ReaScript: Close all running reaScripts close these scripts.
JSFX documentaion:
Quote:
The list of scripts that are currently running in the background is available in the Actions menu
|
So I assume it should be an action probably?
|
|
|
05-16-2018, 05:05 AM
|
#7
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
I'm still on 5.79, so unless something new broke it...
|
|
|
05-16-2018, 07:15 AM
|
#8
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
Ah thanks, I misreading (Action menu, not Action list). Anyway, I had modified menus which is the second reason i didn`t see that.
|
|
|
05-16-2018, 08:31 AM
|
#9
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
|
Just had a thought. Might be nice if it were possible to check whether a given script was running via the API...
|
|
|
05-16-2018, 09:39 AM
|
#10
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
This is definitely a FR... and a good one....
|
|
|
05-16-2018, 10:23 AM
|
#11
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
Quote:
Originally Posted by IXix
Just had a thought. Might be nice if it were possible to check whether a given script was running via the API...
|
yeah kinda reaper.GetToggleCommandState( command_id ) == 2 if given id is a currently running reascript
|
|
|
12-08-2021, 09:12 AM
|
#12
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,131
|
Scripters could just agree to store their deferred scripts data (section ID, command ID, name and full path) as an extended state, as a matter of courtesy, e.g.
PHP Code:
function defer_store()
local is_new_value, fullpath, sectionID, cmdID, mode, resolution, val = reaper.get_action_context()
-- Find first available slot local i = 1 repeat local state = reaper.GetExtState(os.date('%x'), 'defer'..i) if #state == 0 then break end i = i+1 until #state == 0
reaper.SetExtState(os.date('%x'), 'defer'..i, table.concat({sectionID, cmdID, fullpath:match('.+[\\/](.+)'), fullpath}, ';'), false)
return i
end
-- Store local defer_data_slot = defer_store()
-- Extract local i = 1 repeat local sectionID, cmdID, name, fullpath = reaper.GetExtState(os.date('%x'), 'defer'..i):match('(.+);(.+);(.+);(.+)') if not sectionID then break end i = i+1 until not sectionID
-- Delete reaper.atexit(reaper.DeleteExtState(os.date('%x'), 'defer'..defer_data_slot, true))
Last edited by Buy One; 12-08-2021 at 11:03 AM.
|
|
|
12-08-2021, 11:13 AM
|
#13
|
Human being with feelings
Join Date: Feb 2016
Location: Hollyweird
Posts: 2,630
|
That seems a lot to expect. Would be great to have a way to detect all deferred via the API
|
|
|
12-08-2021, 01:56 PM
|
#14
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by Buy One
Scripters could just agree to store their deferred scripts data (section ID, command ID, name and full path) as an extended state, as a matter of courtesy, e.g.
PHP Code:
function defer_store()
local is_new_value, fullpath, sectionID, cmdID, mode, resolution, val = reaper.get_action_context()
-- Find first available slot local i = 1 repeat local state = reaper.GetExtState(os.date('%x'), 'defer'..i) if #state == 0 then break end i = i+1 until #state == 0
reaper.SetExtState(os.date('%x'), 'defer'..i, table.concat({sectionID, cmdID, fullpath:match('.+[\\/](.+)'), fullpath}, ';'), false)
return i
end
-- Store local defer_data_slot = defer_store()
-- Extract local i = 1 repeat local sectionID, cmdID, name, fullpath = reaper.GetExtState(os.date('%x'), 'defer'..i):match('(.+);(.+);(.+);(.+)') if not sectionID then break end i = i+1 until not sectionID
-- Delete reaper.atexit(reaper.DeleteExtState(os.date('%x'), 'defer'..defer_data_slot, true))
|
My Ultraschall-Api has a more powerful defer-function that does exactly that,by storing a guid.
Though retrieving the other information isn't implemented yet, but would be easy to do.
However, I think, Reaper could benefit from giving each script-instance a unique guid, which can be enumerated by a function.
And a GetSetScriptInstance-function, that allows getting various infos of the script-instance by passing the script-instance-guid to it.
For instance, getting the hwnd of an opened gui-window.
Or the terminate/new instance-setting.
Or section, cmdid.
Etc.
|
|
|
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:45 AM.
|