How to run a python script instantly without delay?
#1
Hi!

How to run a python script instantly without delay?

Posted in the desired window loading script:
xml:

<?xml version="1.0" encoding="UTF-8"?>
<window id="1110">
    <onload>RunScript(special://home/script.py)</onload>
...
When the window is opened, the script is executed, but always with a delay of 1-2 seconds.

How to get rid of the delay? Is there any way to preload it?

The most interesting thing is that if you call window 2 from a script in window 1, the script immediately starts:
xml:

...
<onclick>RunScript(special://home/script.py)</onclick>
...
Reply
#2
I've always had a lag with custom scripts. It improved a lot with transitioning into a stand-alone addon.
Reply
#3
And there are examples? Or any other solution?
Reply
#4
(2019-03-19, 22:28)noolinrut Wrote: And there are examples? Or any other solution?
 No idea.
Your suggestion of using script to invoke the window and then from the script a while loop to detect window loaded and start the rest of script sounds an interesting hack but probably bad practice...
Reply

Logout Mark Read Team Forum Stats Members Help
How to run a python script instantly without delay?0