Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

ALT-TAB replacement with icons and window titles in ListView


  • Please log in to reply
172 replies to this topic
evl
  • Members
  • 1237 posts
  • Last active: Oct 20 2010 11:41 AM
  • Joined: 24 Aug 2005
New version:

<!-- m -->https://ahknet.autoh...tTab/AltTab.ahk<!-- m -->

not-logged-in-daonlyfreez
  • Guests
  • Last active:
  • Joined: --
@evl: I get the following errormessage when running your new version (unchanged):

Error at line 838.

Line Text: ;
Error: The first character above is illegal in an expression.

The program will exit.


?

evl
  • Members
  • 1237 posts
  • Last active: Oct 20 2010 11:41 AM
  • Joined: 24 Aug 2005
@daonlyfreez:
I downloaded the file to double-check but it runs fine on 2 computers - I'm running Version 1.0.40.09. Which version are you running?

not-logged-in-daonlyfreez
  • Guests
  • Last active:
  • Joined: --
@evl:

I'm trying to run it on 2K with SP4, AHK version 1.0.40.11. I do a literal copy-paste of your code, don't change anything, and still get the same errormessage...

evl
  • Members
  • 1237 posts
  • Last active: Oct 20 2010 11:41 AM
  • Joined: 24 Aug 2005
@daonlyfreez:
I've just installed version 1.0.40.11 and that's not the cause of the problem.

Have you tried right-clicking on the download link and saving the ahk file directly? There may be a formatting/wrapping problem if you're copying and pasting anything.

The only other thing I can think of is that there's something in the code (e.g. DllCall) which is WinXP specific.

Maybe someone else can comment on if they have any problems, as unfortunately I don't have access to any Windows 2000 computers?

not-logged-in-daonlyfreez
  • Guests
  • Last active:
  • Joined: --
:? a 'Save target as...' did the trick... (darn formatting :oops: )

not-logged-in-daonlyfreez
  • Guests
  • Last active:
  • Joined: --
Ok, it works now, but there is something I noticed:

When you Alt-Tab, and hold the Alt key pressed, pressing Escape will act weird. It will focus the upper (?) window, and you can switch with Alt-Tab now, without the listview showing...

Is this intentional?

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Good functionality. It looks similar to the application switch on my mouse:

Posted Image

Nice script.

evl
  • Members
  • 1237 posts
  • Last active: Oct 20 2010 11:41 AM
  • Joined: 24 Aug 2005
daonlyfreez: "When you Alt-Tab, and hold the Alt key pressed, pressing Escape will act weird. It will focus the upper (?) window, and you can switch with Alt-Tab now, without the listview showing... "

I haven't been able to replicate this bug. What should be happening when you do what you described, is: The focused entry should change back to the window that had focus before pressing Alt-Tab and then the gui should be destroyed and focus returned to the original window, just the same as with the windows Alt-Tab. This is done by activating "!Esc" as a hotkey during the time the gui is shown.

Anyone else finding this bug?



@Titan:
Thanks for the compliments. Yes it looks pretty similar to your screenshot, with the exception of more columns in mine - I'm still planning on doing quite a bit more with the script, time permitting. I programmed this script as, out of all the other Alt-Tab replacements, none had quite the funtionality I wanted - they either had a strange layout or too much focus on thumbnail previews which made the window much larger than it needed to be.

daonlyfreez
  • Members
  • 995 posts
  • Last active: Jan 23 2013 08:16 AM
  • Joined: 16 Mar 2005
This only happens when I keep the Alt pressed after Escaping (which results in your described behaviour), and then continue to Alt-Tab, it will switch between windows, not showing any menu.
Posted Image mirror 1mirror 2mirror 3ahk4.me • PM or Posted Image

evl
  • Members
  • 1237 posts
  • Last active: Oct 20 2010 11:41 AM
  • Joined: 24 Aug 2005
@daonlyfreez:
Thanks, I see the problem now and will fix it ASAP.

Demokos
  • Members
  • 105 posts
  • Last active: Jan 20 2011 06:28 PM
  • Joined: 28 Dec 2005
Under XP SP2, if I use Alt-Esc in place of Alt-Tab, I go from one app to the other without any icon-menu. May be it is an integrated feature of Windows ???

evl
  • Members
  • 1237 posts
  • Last active: Oct 20 2010 11:41 AM
  • Joined: 24 Aug 2005

Under XP SP2, if I use Alt-Esc in place of Alt-Tab, I go from one app to the other without any icon-menu. May be it is an integrated feature of Windows ???


Yes it's a window's hotkey - it sends the active window to the bottom of the list of windows (as I recall) and activates the next one. I've just copied the behaviour of the Window's Alt-Tab, where pressing Esc while the Alt-Tab list is displayed cancels it.

  • Guests
  • Last active:
  • Joined: --
Can you add these functions into the script?
1. let user define what windows to appear in the list. For example, I want to press "ctrl+alt+w" and list all microsoft word windows; and press "ctrl+alt+x" and list all microsoft excel windows etc. Can someone teach me how to do this? (better, if the window number of word is 1, the hotkey will just activate the word without showing the list).
2. let user define a working list. say, I define "edit" working list and "drag" 2 microsoft word windows and 1 excel and 2 acrobat windows into the list, then my hotkey "ctrl+alt+x" will activate only this excel instead of showing all the excel documents.

I try to rewrite the code by myself but it sounds difficult for me. I appreciate if you can have a look and give some ideas. Thanks.



Updated: 25-12-05

As the title says, it's an Alt-Tab replacement that makes use of a Listview to display running programs along with their window icons (many thanks to shimanov for figuring out how to retrieve the icons!).

See "LATEST VERSION CHANGES:" near the top of the script for details.

See my latest post(s) for replies to comments, etc.

I've uploaded the script to AutoHotkey.net as it's getting too long for a forum post ;-)

<!-- m -->https://ahknet.autoh...tTab/AltTab.ahk<!-- m -->



evl
  • Members
  • 1237 posts
  • Last active: Oct 20 2010 11:41 AM
  • Joined: 24 Aug 2005
@Guest:
1.
Something like this would be quite useful. Instead of adding more hotkeys, it might be easier (and simpler to use) to add a context menu option to filter all displayed windows to only be those with a specific exe. This would be realtively simple to add currently as I've got most of the code in place for that sort of menu and filtering.

Also, due to the way the script is structured, all the complex stuff has to be done whether or not the Alt-Tab window is actually displayed (i.e. no speed saving possible), but for me it's pretty much instantaneous anyhow.

2.
You can currently filter out specific windows. I hadn't thought about having 2 columns of "include" and "exclude" - I might give this a go as it would be easier to manager large numbers of windows.


Yes, unfortunately the code is pretty long and not especially easy to add large code changes by anyone other than myself, although I have included quite a lot of comments and tried to use very descriptive names for variables so it's not too hard to follow if necessary.

The main factor with some changes I want to do, is saving settings between sessions, such as which windows are included/excluded from the list. There are several ways to do this, such as based on the window title (but hard in cases such as internet explorer) or window class (can be far too general!) or finding the exe associated with a window, although that doesn't make it possible to include/exclude specific windows within that set. I might make all optiuons available to the user, but that doubles or triples the code I have to add :wink: