Include an <alt>-tab in script

Discuss and share scripts and script files...
Post Reply
orange
Posts: 11
Joined: 29 Jun 2014 18:35

Include an <alt>-tab in script

Post by orange »

How can I go about having a script perform the <alt>-<tab> key combination, which switches between other open programs, say XYPlorer and Firefox? In XYPlorer I can press alt-tab and it will switch to another program, but can I automate that as the last step in a script?
Better still, can I tell XYPlorer to switch to an open instance of Firefox or any other program?

highend
Posts: 14627
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Include an <alt>-tab in script

Post by highend »

sendkeys "!{tab}"; doesn't switch to the last active program unfortunately.

So it seems no, XY can't do this (internally).

You need an external helper application, e.g. an AutoHotkey script.

Code: Select all

#NoTrayIcon

fireFox := "ahk_class MozillaWindowClass"

WinActivate, %fireFox%

ExitApp
One of my scripts helped you out? Please donate via Paypal

Post Reply