View Single Post
Old 03-10-2008, 05:38 PM   #12
Marvin Hlavac
Maximum Bitrate
 
Marvin Hlavac's Avatar
 
Join Date: May 2005
Location: Toronto, Canada
Posts: 802
My Photos: ()
Quote: Originally Posted by cMags View Post
Hey Marvin... I noticed that high CPU usage the other day when I tried to use iGkeys (v1.22) as a template for a script of my own. I discovered it's due to your While(1) loop waiting for keystrokes. I modified mine (which was simple and spiked to 100%) to basically do a While(1) Sleep(50) <code> WEnd. Worked great for me and didn't miss a beat for catching keypresses. Just a thought for ya. Oh and don't worry about that problem I asked you about with RR and iG not getting focus - I ended up just waiting for iG to come to focus, then when it loses focus, force it back (only when switching to that screen). Works pretty well.

</threadjack>

Thanks, and sorry I have not had much time for this in the past few months. I don't even have AutoIt installed on my main PC at the moment (which I needed to install Vista on recently).

I have no clue why I didn't put any Sleep() to the while loop. Thanks, I'll keep that in mind and I'll add it there (eventually) !
Marvin Hlavac is offline   Reply With Quote