Background Program Effect on CPU Performance

0

Below is a script that runs in the background and modifies the manner in which the backspace key works. It comes from the How To Geek. I believe the script takes ram from the computer, but does it steal cycles during the time the backspace key isn't hit. In other words does the background program not take any cycles until the trigger event occurs?

#IfWinActive, ahk_class CabinetWClass
Backspace::
 ControlGet renamestatus,Visible,,Edit1,A
 ControlGetFocus focussed, A
 if(renamestatus!=1&&(focussed=”DirectUIHWND3″||focussed=SysTreeView321))
 {
 SendInput {Alt Down}{Up}{Alt Up}
 }else{
 Send {Backspace}
 }
#IfWinActive

user50466

Posted 2011-01-30T17:14:56.167

Reputation: 11

Answers

1

What does my script do?

No, it adds an hotkey event handler to the event handler list of the system.

So, it will not perform CPU cycles when idle...

How to check?

  1. Download Process Explorer.
  2. Add a cycles and cycles delta column and check it for the process. Let me demonstrate you...

Tamara Wijsman

Posted 2011-01-30T17:14:56.167

Reputation: 54 163

1Wow, Tom continues to astound me with his knowledge. The process Explorer program is a great tool to learn about. – user50466 – 2011-01-30T20:39:02.817

0

Autohotkey is open source, so you could ask someone familiar with the code for a definite answer. Normally something like this would listen for every keypress, and quickly halt whenever it knows it's not a backspace.

tobylane

Posted 2011-01-30T17:14:56.167

Reputation: 1 271

You can't easily tell by source code for such a project to see how many CPU cycles your program uses when idle, given that it is self-replicating as it creates binary code from your scripts, most profiler won't show this to you... – Tamara Wijsman – 2011-01-30T17:54:53.390