iSwitchw - cosmetically enhanced edition
Thanks,
Mark
Sort, winlist, D|place a ; at the beginning to comment it, that might work
; Sort, winlist, D|
I commented out the sort statement as you suggested, and changed this line around 505
GuiControl, Choose, ListBox1, 1to
GuiControl, Choose, ListBox1, 2With the sort statement commented out, when iSwitchW displays the window titles, they're in last-used order by default, and the one used previously to the current one is highlighted instead of the current window, so all I have to do is press Enter.
It's not quite as fast as just typing Alt-Tab, but it's only one extra keystroke, Enter, so that's an excellent tradeoff.
Thanks again!
Mark
if search = GuiControl, Choose, ListBox1, 2 else
goes in front of the original GuiControl, Choose, Listbox1, 1 line...
That seems to do the trick.
I get only a blank window when I use this script. The "Window Switcher" dialog comes up, but it is completely blank.
Any ideas? I tried the original version of this script as well and it did the same thing.
I too only get a blank window. Has anyone had success with this script with Win 7? I'm guessing that is the problem, but I don't have time to debug this now.
Make sure there is no other script with a "return" line above the part where you pasted in iSwitchw, or the initialization part of iSwitch (the part at the beginning outside of any blocks) will not run. That solved it for me.
Btw, i modified it to use LWin key instead.
I wanted to be able to cancel by pressing the same key again, but i found i cannot intercept the key while executing the action for the key itself. So my changes are:
Remove:
CapsLock::Add:
~LWin:: Send {Esc}
Add:
if ErrorLevel = EndKey:lwin { Gui, cancel Send {LWin} break } if ErrorLevel = EndKey:rwin { Gui, cancel Send {RWin} break }
@hugov:
With the sort statement commented out, when iSwitchW displays the window titles, they're in last-used order by default, and the one used previously to the current one is highlighted instead of the current window, so all I have to do is press Enter.
Mark, I followed your instructions, but my sort order hasn't changed. I also tried Alias' code, but can't get it. Would one of you please post your code in its entirety?
BTW, I use "capslock & f" as my trigger. No loss of other keys that I use, like left Windows key, and I never accidentally hit it.
Thx,
D
<!-- m -->http://www.autohotke... ... highlight=<!-- m -->
to hide the margin as well as default the colors to system color for background.
Gui, +LastFound +AlwaysOnTop -Caption Gui,Font,s12 cGreen bold,Verdana Gui, Margin , 0, 0 Gui, Add, ListBox, vindex gListBoxClick w600 h500 AltSubmit -VScroll
to make it appear in the center,
Gui, Show, Center h500 w600, Window Switcher
This is very nice. I wish I knew enough of ahk to add an edit box right above the listbox which shows what I am typing (if I typed something wrong). I will have to learn! :)
Oh, and if anyone sees the File Switcher in notepad++ , duplicating that switcher and adapting it to become a window switcher would be great (with its relevant options).
I guess I will try this, when I become better with ahk.
Thanks for sharing this script!!
I wonder if it'd be possible to use other keys as alternative to up/down, for example numpadadd/numpadsub.
I tried to achieve this myself, substituting line 190 with
Input, input, L1, {enter}{esc}{backspace}{numpadsub}{numpadadd}{pgup}{pgdn}{tab}{left}{right}
and line 235 with
if ErrorLevel = EndKey:numpadadd
and similarly for the ErrorLevel entry for {up}, but it doesn't work (I don't master autohotkey to the point of understanding why).
Any suggestions?
Cheers!
Change to this block in the file about line 697
ListBoxClick:
if (A_GuiControlEvent = "Normal"
and !GetKeyState("Down", "P") and !GetKeyState("Up", "P") and !GetKeyState("Tab", "P"))
send, {enter}
return
I know VERY little about autohotkey, but i was hoping to make a very small change to this script so that the TAB button functions like a down arrow, however when i tried simply replacing EndKey:down with EndKey:tab i get weird behavior? Any help would be apprecaited!
Hi all, I am a newbie to AHK and have an existing script for simple tasks file in my home directory.
I really would like to use iswitchw but would need instructions on how to install it.
E.g. I am not sure whether I need a separate script file. Will this script interfere with my existing ones (eg I have a few hotstrings and they need to come at the beginning)?
Many thanks in advance!
Christian