12-21-2024, 04:10 AM
|
#1 |
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,679
|
Full request sounds like this: add a possibility to use set_action_options API function for NOT terminating already running script and auto-cancel launching new instance.
When we run background script, there are three options: - terminate instance (set_action_options flag&1 and flag1|2 to terminate and re-launch) - new instance. This option not available to set via API. - cancel. This option not available to set via API. I`m interested in third option. Why? I`m making a visual notification script with ReaImGui. If I set flag = 1|2, it stops already running script, so all the UI are switched off, the it runs again. This makes notification flickering at the moment of script termination and re-launching again, if the user triggers script multiple times a second. So ReaImGui lost frame at the moment of terminating/relaunching step. EDIT: see mpl_NOtification.lua - https://github.com/MichaelPilyavskiy...tification.lua Last edited by mpl; 01-28-2025 at 12:45 AM. |
|
|
12-22-2024, 07:54 AM
|
#2 |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
+1
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
|
|
01-26-2025, 09:39 AM
|
#3 |
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,809
|
Hmm if we had the option for scripts to completely ignore re-execute, then there would be no way for the user to terminate a misbehaving script. hmmmmm.
edit: ah, pointed out to me the action to close all reascripts would still work. ok. Last edited by Justin; 01-26-2025 at 06:05 PM. |
|
|
01-28-2025, 12:46 AM
|
#4 |
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 4,679
|
thanks!
(implemented in 7.31 rc1) |
|
|
01-28-2025, 04:28 AM
|
#5 |
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,680
|
I wonder if there is a way to do this:
if previous instance of the plugin is running, and docked and script tab is the active tab in the dock: terminate script instance and terminate previous running instance. and if previous instance of the plugin is running, and docked and script tab is NOT the active tab in the dock: cancel the new instance and set the previous running instance tab active this is how the mixer or other REAPER windows do. ie: if I have multiple windows docked at the bottom, and the mixer is there, but not the active tab, if I run the action to show the mixer, it changes the active tab to the mixer. if the active tab is the mixer already, it closes the mixer. |
|
|
02-11-2025, 01:19 AM
|
#6 |
|
Human being with feelings
Join Date: Jul 2019
Posts: 252
|
Could we please get an option to set 'new instance' via the api? It's useful for scripts that take a while to load since you can keep them running in the background and then reactivate them with a new instance that just tells the script to reload if it's already open.
|
|
|
07-17-2025, 07:27 AM
|
#7 | |
|
Human being with feelings
Join Date: Dec 2019
Posts: 396
|
Quote:
Thank you! |
|
|
|
07-21-2025, 04:20 PM
|
#8 |
|
Human being with feelings
Join Date: Jul 2019
Posts: 252
|
|
|
|
![]() |
| Thread Tools | |
|
|