AutoHotkey Community

It is currently May 27th, 2012, 6:01 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 169 posts ]  Go to page 1, 2, 3, 4, 5 ... 12  Next
Author Message
PostPosted: November 18th, 2005, 1:48 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
Updated: 13-04-08

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 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 ;-)

http://www.autohotkey.net/~evl/AltTab/AltTab.ahk

Latest changes:
Quote:
LATEST VERSION CHANGES:

Since 21-03-08:
FIX: Some windows weren't shown in the list.

Since 19-03-08:
FIX: Group/tab related bugs

Since 25-04-06:
+: Groups of windows are shown in tabs - they can be re-arranged by drag-and-drop.
+: Settings tab.
+ & FIX: Updates to the listview colour code - much smoother now (thanks to ambi for updating the Listview script).
+ & FIX: Sorting of columns with direction indication ([+] or [-])
+: Mouse wheel over the TASKBAR scrolls the list - Middle button SELECTS a window in this mode (it normally CLOSES a window!).
+: Save data on big changes (in addition to program exit) - e.g. new group created, hotkeys changed
CHANGE: Selections with the mouse are now made with a double click (or just release the Alt key) instead of a single one.
CHANGE: Adjusted display position to be centered by default.
CHANGE: Dialog windows only indicated by red higlight (not by title too).
CHANGE: Not Responding windows indicated in a new column (not by title).
CHANGE: Many speed optimisations and code improvements (it's almost decipherable now ;-))
FIX: Handling of "Not Responding" windows with no delays.


Image

Image


Last edited by evl on April 13th, 2008, 10:26 am, edited 16 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2005, 3:54 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
I'll leave a copy of the original script here in case others want to modify the basic functionality before the script gets too long to follow easily:

Now uploaded to AutoHotkey.net:

http://autohotkey.net/~evl/AltTab/AltTa ... ersion.ahk


Last edited by evl on December 24th, 2005, 1:41 pm, edited 3 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2005, 8:04 am 
Offline

Joined: September 25th, 2005, 4:31 pm
Posts: 610
Nice work.

It is a good start to what could become a full featured process/window manager.

A couple of suggestions:

1. Remove the spaces preceding the Control Panel applets' (CPA) window titles. They don't provide sufficient information. If you want to distinguish those windows from the rest, consider: [CPA] Date and Time Properties, [Control Panel] Date and Time Properties, [DIALOG] Date and Time Properties, etc; or add another column to identify the special nature of a particular window.

2. Replace the awful generic Control Panel icon. To retrieve icons for a CPA try the following:

(tested with Windows XP SP2)

Code:
further testing required to ensure universality


Last edited by shimanov on November 19th, 2005, 9:13 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2005, 9:49 am 
Offline

Joined: August 19th, 2005, 4:36 pm
Posts: 14
Location: Germany
@evl

Great. I have written a tiny windows switcher with a listview. But without icons it is a little bit depressing.

How about:

while pressing ALT, enter the first character of a window to select it ?

multi monitor support, e.g. while pressing ALT press 1 for monitor 1,
2 for monitor 2.see my post http://www.autohotkey.com/forum/viewtopic.php?t=6064&highlight=
and shimanovs answer.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2005, 6:57 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
Posted a new version at the beginning of the thread. Quite a few changes.


LATEST VERSION CHANGES:
20-11-05
Changed to activating the PID so that the topmost window is activated (e.g. save dialog)
Compare windows to pid of explorer.exe and include window if same - for shortcut icon changing, etc
Icons for control panel applets (CPA) - credit to shimanov!
Changed default icon for window not found
Check if more than 1 pid in alt-tab list then use ahk_id instead of PID for activating
Limit gui size when too many windows to fit on screen, A_ScreenHeight*0.8


@ shimanov:
Implemented both your changes. Big thanks for the control panel icons - would have taken me days :lol: Prefixed the "DIALOG" bit with a / and some spaces so they still stand out and the / for the first letter selection suggestion from

@ hps:
Keeping the Alt key pressed and pressing the first letter of the window name is implemented now. Without a tiny bit of modification it will only work for characters A-Z, 0-9 and / (since the alt key is held down, it actually sends modified ascii codes which had to be taken into account - e.g. captial letters).
I don't have a multimonitor setup myself so wouldn't really be able to test it out - and I wouldn't punish this forum with code I wrote and hadn't tested :wink:


I'm probably not doing the checks for which windows/dialogs to exclude/activate (by PID/ID) and the ownership of windows (seem to have got DllCall("GetParent"...) to work for dialog windows) in the best way but it should work for most stuff - so until I have a better idea or someone suggest a good way of finding out how windows are owned/topmost child, it'll have to do, which is sufficient right now I believe.

Also, any suggestions on how to reduce memory usage are welcome, as windows task manager says it's using just under 5 mb (I know it's not particularly reliable at reporting memory usage). I think I'm destroying the gui, listview and iconlist correctly.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 21st, 2005, 2:01 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
Nice work! However, could you make a few simple changes?
- The tiny icons are too small on my highres screen. I would need a switch or something to be able to show larger ones.
- The last row of the list is not visible, the second last one is only partially visible on my monitor.
- Could you add a code section for the configuration/location/size/color etc. settings in the beginning of the script? It is much easier to change something there than searching inside the code, and making incompatible changes.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 21st, 2005, 4:06 pm 
@ Laszlo: Thanks for the comments.
- The original of shimanov's work had big icons so I've quite easily added those back and just finalising the layout of things now. I might also add an option to automatically switch to small icons if there are too many big icons to fit on the screen.
- Not 100% sure why the last row wasn't visible for you but I've added an extra pixel to the height and in teh next version you'll be able to easily modify the height so you could tweak it and let me know your results if it still does it.
- I'd been planning to add some user configurable options at the top and now seemed like the right time so they're going in there, although I also plan eventually to add in a proper configuration window for changing settings more easily.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2005, 6:42 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
Posted a new version at the beginning of the thread. Quite a few changes again.

LATEST VERSION CHANGES:
> 21-11-05
"USER EDITABLE SETTINGS" section for easy customisation
Choice of large or small icons (see "USER EDITABLE SETTINGS" section)
Mouse wheel switching while displaying list
Large re-structure of code to allow for more automatic sizing of the listview/gui
Several small fixes.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2005, 8:19 am 
Offline

Joined: December 7th, 2005, 7:52 am
Posts: 7
Nice :D

As I already posted in 320MPH - Ultra Fast Anything-Launcher (http://www.autohotkey.com/forum/viewtopic.php?t=3010&postdays=0&postorder=asc&start=75)...
I have a feature wish list - to include a search for tasks to switch to (in the way Rajat handels that)... Would come pretty handy if you have a mess full of active tasks and you would like to switch by typing some characters from its name and sitch by confirming with enter.
Possibility to exclude some tasks, that you don't want to see there, would be also welcomed...
Regards,
jOc


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2005, 11:02 am 
Offline

Joined: August 15th, 2005, 7:15 am
Posts: 107
Location: North Carolina
Evl, I just wanted to comment that this is very impressive! Both in the coding and in the look and function.

Best,

Bob

_________________
When it comes to Binary, there are 10 types of people. Those who get it and those who don't. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 8th, 2005, 2:33 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
@ jOc: Already added into the version I'm currently working on, the ability to cycle through windows in the list when pressing the first letter of the title (while the alt key is still held down from the initial press of Alt-Tab). I think typing more letters is probably unnecessary for the majority of users, however I might add a method for filtering if I can re-work my code to allow for manipulating the list order (e.g. exclude windows, group windows, etc).

@ Terrapin: Thanks for the kind words. I've replied to your PM too.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2005, 8:49 pm 
Very nice... Thanks for sharing.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 24th, 2005, 1:48 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
Posted a new version (and updated the first 2 posts with the AutoHotkey.net links):

http://www.autohotkey.net/~evl/AltTab/ALtTab.ahk

Here are the changes (quite a lot of them, I'm much happier with it now, also added a fun feature to dock windows to the edges of the screen and have them autohide - available through the context menu, which detects which entry was right-clicked on):

Quote:
LATEST VERSION CHANGES:
> 24-12-05
Edge-docking - dock windows to the edges of the screen and have them auto-hide (like the taskbar can)
Ability to exclude certain windows from alt-tab list (right-click menu)
Basic hotkey support for switching to specific windows (using window groups and adding window classes) (right-click menu)
Much more reliable handling of dialog windows by excluding ws_disabled ones
Activating by ahk_id again (due to change listed above)
Automatically switch to small icons if there are too many big icons to fit on the screen
Checks for alt key state to catch quick press and release
Doesn't display alt-tab list if alt key already released (due to change listed above)
Y-axis positioning - center or start at specified position and size downward, then up to max height (if necessary)
Generic icon for windows that don't return an icon due to being crashed/suspended
Type first letter of a program to cycle through them while still holding Alt.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 24th, 2005, 3:18 pm 
Very nice! 8)

Two things:

- It doesn't resize with large icons...
- Could you add the option to add a "Show Desktop" in the list (Hide all windows, activate the desktop, like the icon in the Quick Launch bar)? That would be a great enhancement!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 24th, 2005, 8:54 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
EDIT for paragraph below: About resizing, I think I see what you mean now - there is too much blank space at the bottom of the listview? Not sure why it does it on another computer I just tried it on, but works fine on mine - think it must be to do with windows font sizes as mine are rather customised - I'll look into it and see if I can find a better way of determining the correct height of each row in the listview to calculate the gui height.
(Think I got this now: Could you explain "doesn't resize with large icons..."? I presume you haven't modified the code at all? The default is for using large icons and it should automatically switch to using small icons when it takes up too much of the screen. The Alt-Tab list should be automatically sized vertically to display all the items without a scrollbar being visible.)

I kind of doubt I'd add an entry for the desktop unless other people want it too - it's not something I think would be worth possibly interfering with the order of windows when there are already the windows shortcuts Win+D or Win+M and Win+Shift+M.

Thanks for the feedback.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 169 posts ]  Go to page 1, 2, 3, 4, 5 ... 12  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher, JamixZol, rbrtryn and 19 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group