You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Option to disable 'Another script is currently running' popup #145
In some scripts, I need to press some hotkeys in quick sequence. When doing so, the 'Another script is currently running' popup appears and I have to close it every time before proceeding. An option to disable that popup would be appreciated.
Maybe it could be possible for Python Script to automatically just wait for the previous script to end without any warning, before proceeding with the execution of a subsequent script?
@pidgeon777 Could you add a step by step description. Currently I don't understand what you want to do. Seems you are trying to run multiple python scripts. Did you assign key shortcuts for them and starting the scripts with the shortcuts and don't want to wait until the script execution has finished before starting the next action.
The problem that might arise by waiting in the background while the user moves on is e.g. that the focussed document might change and some unexpected text document is modified.
MessageBox(NULL, _T("Another script is currently running. Running two scripts at the same time could produce unpredicable results, and is therefore disabled."), _T("Python Script"), 0);
and it should be possible to add a config option to skip the warning
I suggest adding a separate parameter for each script: Z:....\aaa.py | [x] Skip (Skip next, don't wait)
To specify that the same script should skip re-execution,
if the same script is currently being executed.
Skip not the whole queue, but only the execution of this script from its queue,
that started executing before the previous execution of the same script was completed.
This parameter should not affect the execution of other scripts and should display a warning window.
Should only affect the same script.
This is needed for individual scripts that are assigned to npp hotkeys.
And when you accidentally hold such keys longer, there is a "mass" execution of this script.
And as a consequence, this warning window constantly pops up with the whole queue stopping.
Sometimes you need a lot of executions at a time, and don't calculate the key hold time.
Additionally, you can add another parameter to wait for its previous execution if its execution is important.
Then the choice would look like this:
Z:\....\aaa.py | [ ] Skip [x] Wait
and
Z:\....\aaa.py | [x] Skip [ ] Wait
If you add a wait, then you have to watch for loss of focus and make the entire queue stop executing with a warning window displayed!
If you add such a thing I'll report back with test results.
Activity
chcg commentedon Jul 16, 2020
@pidgeon777 Could you add a step by step description. Currently I don't understand what you want to do. Seems you are trying to run multiple python scripts. Did you assign key shortcuts for them and starting the scripts with the shortcuts and don't want to wait until the script execution has finished before starting the next action.
The problem that might arise by waiting in the background while the user moves on is e.g. that the focussed document might change and some unexpected text document is modified.
The relevant code is here:
PythonScript/PythonScript/src/PythonScript.cpp
Line 503 in 1402c12
and it should be possible to add a config option to skip the warning
westyles commentedon Oct 7, 2024
Hello
And I've been touched by this problem.
I suggest adding a separate parameter for each script: Z:....\aaa.py | [x] Skip (Skip next, don't wait)
To specify that the same script should skip re-execution,
if the same script is currently being executed.
Skip not the whole queue, but only the execution of this script from its queue,
that started executing before the previous execution of the same script was completed.
This parameter should not affect the execution of other scripts and should display a warning window.
Should only affect the same script.
This is needed for individual scripts that are assigned to npp hotkeys.
And when you accidentally hold such keys longer, there is a "mass" execution of this script.
And as a consequence, this warning window constantly pops up with the whole queue stopping.
Sometimes you need a lot of executions at a time, and don't calculate the key hold time.
Example:
Additionally, you can add another parameter to wait for its previous execution if its execution is important.
Then the choice would look like this:
and
If you add a wait, then you have to watch for loss of focus and make the entire queue stop executing with a warning window displayed!
If you add such a thing I'll report back with test results.
Example: