Keystroke on background window, active or minimized will do

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
vnylng
Posts: 1
Joined: 01 Nov 2014, 21:26

Keystroke on background window, active or minimized will do

01 Nov 2014, 21:41

Hi first of all I am very sorry for posting this question. I am new and I just found AutoHotkey an hour ago and tried to research the thing that I want but unluckily I cant find anything that will fit my situation. What I want to do is to create a keystroke with a minimized window, like a game app, browser, or even at microsoft words. I want to work the script even the window is active or minimized and still doing the same command.

Code: Select all

#Persistent
SetTimer, PressTheKey, 150
Return

PressTheKey:
Send, {Space}
Return

F12::Pause

This is what I actually want to work in a minimized window. It press the specified key and it has its own timer please help me. If this is possible I will add another keys to type and has their own timer. Sorry for my English. Thankyou
Leefme
Posts: 90
Joined: 30 Sep 2013, 22:13

Re: Keystroke on background window, active or minimized will

02 Nov 2014, 12:42

Don't be sorry for posting a question, it is one way to seek information.

If you didn't bother to do any research before posting then we would be disappointed.

When you want to access a window that may not be active, the command to use is ControlSend
(there are also other "Control..." commands)

In the case of a minimized window, some windows >ignore< keystrokes.
Some other windows ignore keystrokes if they are not active.

I fear you will be dissapointed, if you expect to use a simple script to access all of the applications you list.

In my experience, I develop a script to access a particular application.
For a different aplication a different script is written.

In theory, I could combine the different scripts into one, and use 'ahk_class' to differentiate which 'piece' to use.
Guest

Re: Keystroke on background window, active or minimized will

02 Nov 2014, 20:28

Leefme wrote:Don't be sorry for posting a question, it is one way to seek information.

If you didn't bother to do any research before posting then we would be disappointed.

When you want to access a window that may not be active, the command to use is ControlSend
(there are also other "Control..." commands)

In the case of a minimized window, some windows >ignore< keystrokes.
Some other windows ignore keystrokes if they are not active.

I fear you will be dissapointed, if you expect to use a simple script to access all of the applications you list.

In my experience, I develop a script to access a particular application.
For a different aplication a different script is written.

In theory, I could combine the different scripts into one, and use 'ahk_class' to differentiate which 'piece' to use.


Thanyou for your effort. Yesterday I was able to understand on how to use the ControlSend to my code. But there's still problem and I think that ControlSend is really tricky like others said please take a look at this http://www.autohotkey.com/board/topic/9 ... d-problem/ we have the same problem now. Please help me if you have knowledge about it. Thanks!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mebelantikjaya, Rohwedder and 321 guests