AutoHotkey Community

It is currently May 27th, 2012, 8:37 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 169 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 12  Next
Author Message
 Post subject:
PostPosted: April 14th, 2006, 8:10 pm 
Offline

Joined: September 30th, 2005, 5:15 pm
Posts: 58
Location: Fort Wayne, IN
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 14th, 2006, 9:43 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
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 :roll: :lol: ). 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).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 15th, 2006, 1:35 am 
Offline

Joined: September 30th, 2005, 5:15 pm
Posts: 58
Location: Fort Wayne, IN
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 15th, 2006, 3:12 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
Thanks for the code (and congratulations on finding the relevant sections in the huge script :lol: ). 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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2006, 7:33 am 
Offline

Joined: December 7th, 2005, 7:52 am
Posts: 7
Hi

I have already adopted your script as a part of startup routine :D.

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2006, 12:03 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2006, 12:50 pm 
Offline

Joined: December 7th, 2005, 7:52 am
Posts: 7
evl, tnx!

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

Regards,
jOc


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2006, 8:06 pm 
Offline

Joined: September 30th, 2005, 5:15 pm
Posts: 58
Location: Fort Wayne, IN
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2006, 9:53 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
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 :lol:

(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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2006, 9:41 pm 
Offline

Joined: January 19th, 2006, 1:50 pm
Posts: 11
What about numbering the list?
And adding hotkeys to it


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2006, 9:53 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject: a few ideas
PostPosted: October 24th, 2006, 2:41 am 
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?


Report this post
Top
  
Reply with quote  
 Post subject: question
PostPosted: October 24th, 2006, 2:44 am 
also, is there a hotkey for clearing the group filter from the alt-tab list?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 24th, 2006, 4:02 am 
Offline

Joined: June 6th, 2005, 11:35 pm
Posts: 179
Location: Northern Virginia
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 27th, 2006, 5:11 pm 
Offline

Joined: October 4th, 2006, 2:15 am
Posts: 250
Location: Louisville, KY
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.


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 Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 12  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: AndyJenk, Aravind, hyper_, xXDarknessXx and 11 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