AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ALT-TAB replacement with icons and window titles in ListView
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
deanhill1971



Joined: 30 Sep 2005
Posts: 58
Location: Fort Wayne, IN

PostPosted: Fri Apr 14, 2006 8:10 pm    Post subject: Reply with quote

evl - Thanks for the useful script.

However, I can't figure something out. I defined ScrollLock to be the single key to popup the list. I now want to use the Up and Down arrow keys to move through the list. I'd still like Tab and Shift+Tab to work also. Is there a way to make the arrow keys work?

Also, in the Help section of the script could you put the link for this discussion thread and the link to download the latest copy? I always have trouble finding my way back to this thread.
Back to top
View user's profile Send private message
evl



Joined: 24 Aug 2005
Posts: 1234

PostPosted: Fri Apr 14, 2006 9:43 pm    Post subject: Reply with quote

Thanks for the comments.

Unfortunately there's no way in the script to use 2 sets of Alt+Tab hotkeys (such as the default ones and the user defined ones). The simplest answer would be to make a copy of the folder you run the script from and run a 2nd copy of the script and configure that with a different set of hotkeys (they need to be in different folders due to the ini file being used for saving settings). I know it's not particularly convenient, but trying to allow for a wide range of key combinations and also work around the many quirks of autohotkey's hotkey syntax are quite a nightmare (you've seen the interface I had to provide for changing hotkeys with dozens of tickboxs for the the modifier keys, etc - well just imagine what the code looks like if that's the simplified user interface Rolling Eyes Laughing ). Being able to define hotkeys with 3 or more keys directly (instead of with modifier symbols) would have simplified the code a lot, but that feature request is very near the bottom of the Planned Features list for AutoHotkey.

Good idea about the links, I'll add them for the next version (I've not worked on it much recently but have added some extra columns to show the state of the windows such as min/max and always-on-top and now have some code to be able to highlight lines in the lsitview which should be handy too).
Back to top
View user's profile Send private message
deanhill1971



Joined: 30 Sep 2005
Posts: 58
Location: Fort Wayne, IN

PostPosted: Sat Apr 15, 2006 1:35 am    Post subject: Reply with quote

Thanks for the quick reply.

I found a simple solution (if you are open to it). In the Key_Pressed_1st_Letter section, I just added the following code:
Code:
  If (Key_Pressed_ASCII =40) ; Down arrow
    GoSub Alt_Tab
  If (Key_Pressed_ASCII =38) ; Up arrow
    GoSub Alt_Shift_Tab


Now the arrow keys move up and down. I think you can make this a standard feature because it shouldn't cause any problems. What do you think?
Back to top
View user's profile Send private message
evl



Joined: 24 Aug 2005
Posts: 1234

PostPosted: Sat Apr 15, 2006 3:12 am    Post subject: Reply with quote

Thanks for the code (and congratulations on finding the relevant sections in the huge script Laughing ). I've added them to the code as they seem logical and shouldn't interfere with anything (sometimes holding down the Alt key can affect the ASCII codes but not in this case).

I just found a bug that could cause the script to lock up with 100% cpu usage if the user holds down the single-key alt-tab button and causes the list to cycle rapidly. Here's a fix until I release the next version (just replace the Single_Key_Show_Alt_Tab section of code with what is written below):

Code:

Single_Key_Show_Alt_Tab:
  If A_TimeSincePriorHotkey < 50 ; prevent a crash if holding down the Single_Key_Show_Alt_Tab button
    Sleep, 50

  Single_Key_Show_Alt_Tab_Used =1
  Send, {%Alt_Hotkey2% down}{%Tab_Hotkey%}
  Hotkey, *%Single_Key_Hide_Alt_Tab%, ListView_Destroy, On
Return
Back to top
View user's profile Send private message
jOc



Joined: 07 Dec 2005
Posts: 7

PostPosted: Wed Apr 19, 2006 7:33 am    Post subject: Reply with quote

Hi

I have already adopted your script as a part of startup routine Very Happy.

I have one question... I have made this change in ini file by hand:

[Hotkeys]
Alt_Hotkey=^
Tab_Hotkey=RShift
Shift_Tab_Hotkey=^Enter

I use right.control & right.shift as alt.tab replacement. But, occasionally I need control+enter for other purposes (for that and also for shift+enter I would like to use LCtrl & LShift and leave RCtrl & RShift exclusively for script)...
If I specify Alt_Hotkey=RCtrl script gives an error. Any suggestions?

Tnx,
jOc
Back to top
View user's profile Send private message
evl



Joined: 24 Aug 2005
Posts: 1234

PostPosted: Wed Apr 19, 2006 12:03 pm    Post subject: Reply with quote

Due to the way you have to create hotkeys in AutoHotkey, it gets extremely complicated to support a range of non-standard hotkeys (i.e. hotkeys that aren't a combination of a modifier (ctrl, alt, etc) and ordinary key) - hence a combination of two modifier keys is not supported. As a workaround you could add a hotkey directly in the script for "Suspend, Toggle" to turn on/off the script's hotkeys so you can then use the keys as normal - or just select that entry from the tray icon.
Back to top
View user's profile Send private message
jOc



Joined: 07 Dec 2005
Posts: 7

PostPosted: Wed Apr 19, 2006 12:50 pm    Post subject: Reply with quote

evl, tnx!

Suspend hotkey in tray is OK and this is what I will use.

Regards,
jOc
Back to top
View user's profile Send private message
deanhill1971



Joined: 30 Sep 2005
Posts: 58
Location: Fort Wayne, IN

PostPosted: Tue Apr 25, 2006 8:06 pm    Post subject: Reply with quote

I think there is a bug in the Initiate_Hotkeys section. I was trying to define Control+` as the key to show the menu. So in the ini file, I put the following
Code:
Single_Key_Show_Alt_Tab=^`

When I run AltTab.ahk, I get the message:
Quote:
Error: "Control`" is not a valid key name. The current thread will exit.

The ini file now shows that "^" has been replaced by "Control":
Code:
Single_Key_Show_Alt_Tab=Control`

To fix the problem, I comment out the following two lines in Initiate_Hotkeys:
Code:
;    If Single_Key_Show_Alt_Tab contains #,!,^,+
;      Replace_Modifier_Symbol( "Single_Key_Show_Alt_Tab" , "Single_Key_Show_Alt_Tab" )

Why do you call Replace_Modifier_Symbol()? It doesn't seem to be needed.
Back to top
View user's profile Send private message
evl



Joined: 24 Aug 2005
Posts: 1234

PostPosted: Tue Apr 25, 2006 9:53 pm    Post subject: Reply with quote

Thanks for pointing it out, it was unnecessary for the "single key" hotkeys as I don't need to use GetKeyState on them (the reason for calling Replace_Modifier_Symbol), unlike the Alt hotkey. That code went through some major changes and I'm surprised that's the first error that's turned up Laughing

(Just in case you hadn't noticed, you can set the hotkeys from the Hotkeys entry in the context menu you get by right-clicking on the Alt-Tab window - you can set Ctrl+` using the hotkey box (after commenting out those lines of code)).

I'll be uploading a new version soon hopefully, with a few extra features and a bit of eye-candy thanks to shimanov's listview line color code.
Back to top
View user's profile Send private message
ranlun



Joined: 19 Jan 2006
Posts: 11

PostPosted: Sat May 13, 2006 9:41 pm    Post subject: Reply with quote

What about numbering the list?
And adding hotkeys to it
Back to top
View user's profile Send private message
evl



Joined: 24 Aug 2005
Posts: 1234

PostPosted: Sat May 13, 2006 9:53 pm    Post subject: Reply with quote

I think it'd be possible without a huge amount of code although it'd be complicated by waiting for more than 1 digit (e.g. for window numbers >9). It would also break the existing "press the first letter to select that window" method for any windows that start with a number.

Does anyone else have any opinions on the usefulness of this?
Back to top
View user's profile Send private message
cracksloth
Guest





PostPosted: Tue Oct 24, 2006 2:41 am    Post subject: a few ideas Reply with quote

hmm... i tried using up/down arrows to navigate the list but it didn't seem to work for me. is this update included in the latest download? i have left all hotkey assignments at their default values. do i understand the post above correctly? this should work, right?
Back to top
cracksloth
Guest





PostPosted: Tue Oct 24, 2006 2:44 am    Post subject: question Reply with quote

also, is there a hotkey for clearing the group filter from the alt-tab list?
Back to top
AiKscroll



Joined: 06 Jun 2005
Posts: 179
Location: Northern Virginia

PostPosted: Tue Oct 24, 2006 4:02 am    Post subject: Reply with quote

Hi, i just came across this script and is really NICE. I suggest people use it with Windows Vista Transformation pack. Looks real nice.
_________________
_AiK
Back to top
View user's profile Send private message AIM Address
wtg



Joined: 04 Oct 2006
Posts: 85
Location: Louisville, KY

PostPosted: Fri Oct 27, 2006 5:11 pm    Post subject: Reply with quote

Just came across this myself and thought I'd try it out, running into a few problems.

First, I docked an app, which is very cool. However, after undocking it it's AlwaysOnTop property seems to have been set (and it wasn't before), because now it stays on top unless I minimize it.


Second, I have the Windows XP Alt-Tab PowerToy installed. Running your program replaces this, like one would expect. I noticed someone else in the thread mentioned using the ScrollLock key as a one-key means of opening the Alt-Tab list and I thought that was a good idea. However, when I setup ScrollLock as a single-key hotkey, pressing it then brings up the XP Alt-Tab PowerToy task list, not yours. I tried a couple other keys too - same behavior. Whatever single-key hotkey I setup, it switches to the PowerToy task switcher, not yours. However, Alt-Tab continues to work fine.

Just for kicks, I changed the code in Single_Key_Show_Alt_Tab: to use SendPlay instead of Send to see what effect that had. When I did this, the original Windows Alt-Tab app opens, not yours or the PowerToy replacement. Weird (to me anyway). SendInput and SendEvent both open the PowerToy.

Third, I setup a group and assigned a hotkey, Ctrl-Alt-O. When I press this the first time, again the XP Alt-Tab PowerToy pops, though just momentarily then disappears, leaving my current windows menu selected (like if one pressed Alt all by itself). Then, if I press Alt-Tab to switch to your app, my minimized, formerly docked, app window activates with the Alt-Tab window behind it and the window with the Ctrl-Alt-O hotkey selected in the list. The formerly docked window is not related at all to the group with the hotkey. As long as I don't hit the group hotkey, the formerly docked windows stays minimized when I Alt-Tab into your app.

Finally, I tried setting up Alt-ScrollLock as the single-key hotkey, running into the same problem as deanhill1971 above with Ctrl`.

I've not tried uninstalling the XP PowerToy yet. If I do, I'll post back with the outcome.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 6 of 10

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group