Jump to content

Recommended Posts

Posted

Hey,

I want to leave an autoit file running in the background that looks for a key i press.
However, is it possible to "hook" the key that the key press ONLY sends to the autoit script and not to whatever program i currently work in?

Posted

Your first sentence sounds like a keylogger.

Your second sentence sounds like you want to use AccelKeys. Accel keys are like hotkeys that are only active when your GUI is in focus.

What are you trying to do? Could we get some more info.

Posted

No, if i wanted a keylogger it would have to look for every key pressed, wouldn't it?

I want to control an autoit script that is running in the background with my keyboard. Let's say with the F1 key.
Now the problem is, if i am in - for example - notepad and press F1, it will open the windows help, i don't want that.

I want to know if there is a way that the F1 key only gets recognized by autoit and not by notepad, while focus is not on the autoit script.

Posted

Another way of course, is to use _IsPressed, but you would need to be careful, and certainly use the DLL option for repetitive checking. That could solve the issue regarding another active program, but will chew up processing cycles if called too often, so a Sleep would be necessary. You would have to make it a unique key combo as well, or risk issues related to that, when using an editor or any program that takes input, etc.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

  Reveal hidden contents

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...