Total scrub looking for help, script for background window Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Blyat

Total scrub looking for help, script for background window

14 Dec 2017, 07:11

Hello,

I am a total noob/unknown to AHK, but after a day or two of googling and asking mates they sent me here. I am looking for a script that hit keyboards in a background application, because i have a macro on my keyboard right now (corsai cue) but then i can't touch my computer since it will use it on whatever window has focus.

I have found this post : https://autohotkey.com/board/topic/7183 ... ackground/

The guy seemed to have the same issue as me, but I personnaly don't undersatnd a word. I also got three applications on the same name and want it to run on two... It would basically just be a loop of very easy keystrokes with delay between each of them that I can provide, but I don't knwo how to get this program id etc...

I know its alot asking but im a total scrub and i really hope you guys can help me out... thank you
John316
Posts: 13
Joined: 15 Dec 2017, 08:53

Re: Total scrub looking for help, script for background window  Topic is solved

15 Dec 2017, 12:37

You can try this...

Code: Select all

SetTitleMatchMode, 2            ; Match the window title easier
WinGet, winID, PID, Notepad     ; PID: Retrieves the Process ID (PID) of a window.
MsgBox, %winID%                 ; Show the ID of the Notepad window

Loop
{
    Send, a         ; send keystrokes (letter a)
    Sleep, 1000     ; wait 1 second
    Send, b
    Sleep, 1000
}
WinGet will get the Process ID for you. Replace Notepad with the window title you need the Process ID for. Hope this helps..

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada and 98 guests