AutoHotkey Community

It is currently May 27th, 2012, 9:49 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: November 7th, 2006, 6:27 pm 
Offline

Joined: October 17th, 2006, 2:45 am
Posts: 23
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


Report this post
Top
 Profile  
Reply with quote  
PostPosted: November 7th, 2006, 7:01 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
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?

... :?:

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 7th, 2006, 7:34 pm 
Offline

Joined: October 17th, 2006, 2:45 am
Posts: 23
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 7th, 2006, 8:25 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 7th, 2006, 9:11 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2006, 10:53 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
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.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2006, 4:34 pm 
Offline

Joined: October 17th, 2006, 2:45 am
Posts: 23
Great idea PhiLho


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Maestr0, XstatyK and 56 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group