How to Select Only Taskbar icons/tabs?

Get help with using AutoHotkey and its commands and hotkeys
PotentialUser

How to Select Only Taskbar icons/tabs?

09 Feb 2014, 03:22

Does anyone know how to identify/select only icons on the Win7 taskbar?
Zelio
Posts: 275
Joined: 30 Sep 2013, 00:45
Location: France

Re: How to Select Only Taskbar icons/tabs?

09 Feb 2014, 16:46

I don't know and too vague... but do you mean a simple "alt + tab" ? Or how retrieve the icon with a code like SendMessage, WM_GETICON, ICON_BIG , 0,, ahk_id %Handle%
SendMessage, WM_GETICON, ICON_SMALL, 0,, ahk_id %Handle%
PotentialUser

Re: How to Select Only Taskbar icons/tabs?

10 Feb 2014, 03:53

I want to make a keystroke combination that only works on the taskbar icons and no where else. I don't like the idea of using the mouse position but I think that could work.
Zelio
Posts: 275
Joined: 30 Sep 2013, 00:45
Location: France

Re: How to Select Only Taskbar icons/tabs?

10 Feb 2014, 11:29

Maybe barriere language (sry I'm french), I am not sure to understand, however if your "on" means "when mouse over" I guess you have to use mouse position but without to use coordinate (that is a big nuance).

Try this example from manual, a tooltip to understand and I added a hotkey for your case with win 7

Code: Select all

; This example allows you to move the mouse around to see
; the title of the window currently under the cursor:
#Persistent
SetTimer, WatchCursor, 100
return

WatchCursor:
MouseGetPos, , , id, control
WinGetTitle, title, ahk_id %id%
WinGetClass, class, ahk_id %id%
ToolTip, ahk_id %id%`nahk_class %class%`n%title%`nControl: %control%
return

~a::
MouseGetPos, , , id, control
WinGetClass, class, ahk_id %id%
if (class="Shell_TrayWnd" and control="MSTaskListWClass1")
	msgbox mouse overed tasklist bar and you pressed "a" key
return

esc::
exitapp
Maybe register you on this forum and show your current basic code.
PotentialUser

Re: How to Select Only Taskbar icons/tabs?

11 Feb 2014, 03:22

Thanks Zelio!

This looks like what I want:

MouseGetPos, , , id, control
WinGetClass, class, ahk_id %id%
if (class="Shell_TrayWnd" and control="MSTaskListWClass1")
msgbox mouse overed tasklist bar and you pressed "a" key


I got a bigger problem now that I have to resolve from running another script:
--------------------------------------
I messed up my left touchpad and mouse, button now. I removed the ^/control and used just ~Lbutton::

I tried it out and was doing control left touchpad as well to try and bring other windows forward to see if the window was really on top or not.

Now my left touchpad button sticks on sometimes. The same exact behavior occurs if I use a USB mouse. A restore to the last time I did a windows defender update keeps failing. It's probably something in the registry but I'm very leary of messing with that.

Has anybody else figured out how to fix problems like this??

Thanks in advance!
PotentialUser

Re: How to Select Only Taskbar icons/tabs?

11 Feb 2014, 05:19

Well it's was just a sticky touchpad key :| What threw me is the USB mouse that I grabbed also had a bad left mouse button; what was the odds of that?

Return to “Ask For Help”

Who is online

Users browsing this forum: Bort P, Desperate for my F9, ElektroBerry, flint, Gully, KHA, mehrez1989, SuperFoobar and 202 guests