AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

is it possible to preload .exe file?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
qtmspin



Joined: 17 Oct 2006
Posts: 22

PostPosted: Tue Nov 07, 2006 5:27 pm    Post subject: is it possible to preload .exe file? Reply with quote

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
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 6223

PostPosted: Tue Nov 07, 2006 6:01 pm    Post subject: Re: is it possible to preload .exe file? Reply with quote

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?

... Question
_________________
Back to top
View user's profile Send private message
qtmspin



Joined: 17 Oct 2006
Posts: 22

PostPosted: Tue Nov 07, 2006 6:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Tue Nov 07, 2006 7:25 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Tue Nov 07, 2006 8:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Wed Nov 08, 2006 9:53 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
qtmspin



Joined: 17 Oct 2006
Posts: 22

PostPosted: Wed Nov 08, 2006 3:34 pm    Post subject: Reply with quote

Great idea PhiLho
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group