| View previous topic :: View next topic |
| Author |
Message |
qtmspin
Joined: 17 Oct 2006 Posts: 22
|
Posted: Tue Nov 07, 2006 5:27 pm Post subject: is it possible to preload .exe file? |
|
|
I have a script that runs a program. It needs to be very fast. It seems there is a small lag in loading the .exe file before it runs. I was wondering if there is a way to preload an exe into memory and then call it?
Or maybe a way to compile an exe into a dll? I dont have any programming tools besides autohotkey.
thanks,
Matt |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6223
|
Posted: Tue Nov 07, 2006 6:01 pm Post subject: Re: is it possible to preload .exe file? |
|
|
| qtmspin wrote: | | I have a script that runs a program. |
Is not WinWaitActive effective to make your script halt until the target program loads fully?
...  _________________
 |
|
| Back to top |
|
 |
qtmspin
Joined: 17 Oct 2006 Posts: 22
|
Posted: Tue Nov 07, 2006 6:34 pm Post subject: |
|
|
The exe I am running is a recording and playback of mouse clicks.
It is actually faster then executing the mouse clicks through autohotkey with all the speed tweeks in autohotkey.
I am measuring time in milliseconds. I record the reaction speed with a screen recording program and playback in slowmotion.
So I basically need to preload this exe of mouse clicks and execute them at a given time. I do not need to wait on any windows or anything to that nature.
Matt |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Tue Nov 07, 2006 7:25 pm Post subject: |
|
|
Don't know any solution to that.
But I wonder what that exe of yours is? Is it a c program?
The problem I see is that Windows is not a real multi-tasking (meaning parallel threads) OS. All threads are worked on in sequence. AFAIU you are trying to automatically click on a gui, create an animation from it and measure the time it takes.
Specially the creation of the animation will screw up the measurement. Since it will take a lot of memory and CPU time is assume. Hence it will make the other gui react "slower". And if you make it slower, I see no reason, why you want to "preload" the click program.
You may also try to put your PC under heavy load to slow down the reaction of the gui. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Tue Nov 07, 2006 8:11 pm Post subject: |
|
|
| You could preload this program of yours, if you wanted to... but that would depend entirely on the program, not AutoHotkey. That's a very low-level operation. What you could do is have the program stop completely until it receives a certain signal from AutoHotkey, and then proceed as normal. |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Wed Nov 08, 2006 9:53 am Post subject: |
|
|
AFAIK, if you can just run the program once, then exit it, it (the binary) will live on the cache, at least until Windows feels it is stale and kicks it out of the cache to make room for other programs.
So, if still in the cache, you will avoid at least disk loading time.
Another way is to use a Ram disk. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
qtmspin
Joined: 17 Oct 2006 Posts: 22
|
Posted: Wed Nov 08, 2006 3:34 pm Post subject: |
|
|
| Great idea PhiLho |
|
| Back to top |
|
 |
|