Cycle through open apps, follow taskbar order

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
DavidBevi
Posts: 19
Joined: 23 Oct 2018, 16:51
Location: Milan, Italy

Cycle through open apps, follow taskbar order

10 Nov 2019, 11:32

Hello.
I would like to embed in my script some code that makes Alt+Esc and Alt+F1 cycle trough open apps, in the same order in which they appear on the taskbar.
There are at least two alternative solutions, with AHK and with 7+ Taskbar Tweaker (which I am using).
Since I like to have just one AHK script on my system, I'm wondering if it could be coded in a relatively simple way (like under 20 rows of code).

I've searched on the forum and on the internet, but I found nothing (my english is very basic, sorry if I missed it).
Can you help me?
wen2ri4Nhat
Posts: 1
Joined: 03 May 2020, 10:39

Re: Cycle through open apps, follow taskbar order

03 May 2020, 10:54

:bravo: :headwall: It's seem only some people like us care about this problem. I just want find or create way to switch windows in taskbar-order, it faster than look in to always-change altTab list, and more reliable. Recently, i find so many post about this problem, and everything seem go harder. There seem no official way to retrieve this list, just some trick in tracking on open,close windows! And i'm still a noob,can any Pro help us!?
BNOLI
Posts: 548
Joined: 23 Mar 2020, 03:55

Re: Cycle through open apps, follow taskbar order

03 May 2020, 12:01

Last edited by BNOLI on 03 May 2020, 12:25, edited 1 time in total.
Remember to use [code]CODE[/code]-tags for your multi-line scripts. Stay safe, stay inside, and remember washing your hands for 20 sec !
ahk7
Posts: 575
Joined: 06 Nov 2013, 16:35

Re: Cycle through open apps, follow taskbar order

03 May 2020, 12:04

Just in case you don't know, you can press Windowskey+1(-2-3 etc) and activates the window on the taskbar order, no need for alt-tab in such cases.
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: Cycle through open apps, follow taskbar order

03 May 2020, 22:57

Alt-Tab order is not the same as taskbar order. Alt-Tab order is defined by z-order, which changes as windows are activated, whereas the taskbar order is mostly based on the order of creation. On Windows 7 and later, programs can also be "pinned" to the taskbar, which causes their windows to appear at a specific position in the list instead of at the end (being the last created window). Grouping of windows belonging to the same app also behaves a little differently than in older Windows versions.

I think the closest you can get is to use Active Accessibility (MSAA) or UI Accessibility to read the text associated with each taskbar button and match that to existing windows (or interact with the buttons directly).

You can cycle through the taskbar buttons (but not individual windows) by pressing Win+T, but it always starts at the first button.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 331 guests