Long startup .exe
Moderators: Dorian (MJT support), JRL
Long startup .exe
Hello
It is very important that the script runs as soon as possible.
If the script is run from the Macro application, then it comes out much (about 1-2s), faster than running the .exe file.
But it turned out that it is necessary to run from .exe.
How can you speed up this moment?
It is very important that the script runs as soon as possible.
If the script is run from the Macro application, then it comes out much (about 1-2s), faster than running the .exe file.
But it turned out that it is necessary to run from .exe.
How can you speed up this moment?
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Long startup .exe
My experience is the opposite. Compiled macros run faster than from within the editor.
Re: Long startup .exe
Hmm ...Grovkillen wrote: ↑Sat Dec 12, 2020 3:54 pmMy experience is the opposite. Compiled macros run faster than from within the editor.
What is usually associated with the startup speed of .exe?
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Long startup .exe
Depends on what commands your script is using.
Re: Long startup .exe
My script is 2 lines)
It seems that the matter is not in the script, but in the .exe itselfPress Shift
Press F3
The script works quickly.
It takes a long time to start.
I wonder why the executable file is more than 2MB?
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Long startup .exe
The exe contains the "engine" to run your script. So the minimum size will always be around 2.2MB.
Re: Long startup .exe
I made the same script (if I can call it 2 lines ) in AutoHotKey and created an executable .exe file in itGrovkillen wrote: ↑Sun Dec 13, 2020 2:57 amThe exe contains the "engine" to run your script. So the minimum size will always be around 2.2MB.
It starts much faster there.
So it's not about the power of the PC as I thought before.
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Long startup .exe
I rarely use keyboard commands so i cannot tell but I don't see any delay at all. Perhaps the "engine" is adding a small delay when using the keyboard commands?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Long startup .exe
It is logical that compiled macros will take longer to start than macros in Macro Scheduler where Macro Scheduler is already running.
An analogy would be: opening a word document by double clicking the document when Word is not already opened vs opening a word document from within word which is already open. You'd expect the latter to be quicker because Word itself is already open.
Running a compiled macro requires the macro interpreter to load. When Macro Scheduler is running everything the script needs to run is already present.
But that said, as others have noticed here, any delay is barely negligible to most humans on most systems
An analogy would be: opening a word document by double clicking the document when Word is not already opened vs opening a word document from within word which is already open. You'd expect the latter to be quicker because Word itself is already open.
Running a compiled macro requires the macro interpreter to load. When Macro Scheduler is running everything the script needs to run is already present.
But that said, as others have noticed here, any delay is barely negligible to most humans on most systems
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Long startup .exe
Hello,
Just reading this post, I thought maybe the problem is really it's running too fast. Have you tried adding a delay as the first line? Not much just maybe .5 or .2 (wait>.2)
You may also want to add a ridiculous delay, just for testing purposes. You could also add a mdl> at the start so you can visually see when it started.
It also occurs to me that you are not setting any focus. You are just throwing it out there and hoping the right "thing" catches it. Could something else be absorbing the strokes?
PepsiHog
I also have never experienced anything of this nature with exes.
Just reading this post, I thought maybe the problem is really it's running too fast. Have you tried adding a delay as the first line? Not much just maybe .5 or .2 (wait>.2)
You may also want to add a ridiculous delay, just for testing purposes. You could also add a mdl> at the start so you can visually see when it started.
It also occurs to me that you are not setting any focus. You are just throwing it out there and hoping the right "thing" catches it. Could something else be absorbing the strokes?
PepsiHog
I also have never experienced anything of this nature with exes.
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!