Alt Tab Script Topic is solved

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

Alt Tab Script

09 Jun 2018, 14:25

Hey forum!
So I'm wondering if it's possible to make a script where u can be alt tabbed out of the program you want the script to run in. So simply put: Can i make a script that only runs in a specific program and let's me do other stuff meanwhile it runs?
Looking forward to seeing your suggestions!

- YungGod -
brutus_skywalker
Posts: 175
Joined: 24 Dec 2016, 13:16
Location: Antarctica

Re: Alt Tab Script  Topic is solved

09 Jun 2018, 22:59

Not much to go on, but you can 'Control' a window that's in the background as below.

https://autohotkey.com/docs/commands/ControlSend.htm

Code: Select all

While WinActive("ahk_exe targetApplication.exe"){
	;.... stuff here only happens while targetApplication.exe is active/foreground
}
While WinExists("ahk_exe targetApplication.exe"){	;.... stuff here only happens while targetApplication.exe exists
	;You can use ControlSend to send keystrokes to the window or control while in the background.
	ControlSend [, Control, Keys, WinTitle, WinText, ExcludeTitle, ExcludeText]
	ControlSendRaw: Same parameters as above.
}
Outsourcing Clicks & Presses Since 2004.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: AlFlo, sofista and 203 guests