AutoHotkey Community

It is currently May 27th, 2012, 1:16 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: July 15th, 2010, 6:39 pm 
Offline

Joined: June 25th, 2010, 9:12 pm
Posts: 4
Maybe my last question was too verbose, since nobody responded. I'm wondering if there's a way to modify this script so the window activated before the currently activated one is at the top? That way, you could invoke iSwitchW and hit Enter to duplicate the standard functionality of Alt-Tab. If I could use it for that, I'd replace Alt-Tab with iSwitchW altogether.

Thanks,

Mark


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 15th, 2010, 7:30 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
@Mark Alias: there is a line somewhere around 459 or so
Code:
Sort, winlist, D|

place a ; at the beginning to comment it, that might work
Code:
; Sort, winlist, D|

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
PostPosted: July 16th, 2010, 3:55 am 
Offline

Joined: June 25th, 2010, 9:12 pm
Posts: 4
@hugov: Thanks very much for the help - I hadn't thought it could be that simple...

I commented out the sort statement as you suggested, and changed this line around 505
Code:
    GuiControl, Choose, ListBox1, 1

to
Code:
    GuiControl, Choose, ListBox1, 2

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.

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
Code:


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Well, one more thing:
PostPosted: July 16th, 2010, 4:53 am 
Offline

Joined: June 25th, 2010, 9:12 pm
Posts: 4
I had to include an if-else to make it work properly:
Code:
    if search =
        GuiControl, Choose, ListBox1, 2
    else


goes in front of the original GuiControl, Choose, Listbox1, 1 line...

That seems to do the trick.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 7th, 2010, 5:13 pm 
rathkopf wrote:
davemabe wrote:
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.


Report this post
Top
  
Reply with quote  
 Post subject: Gold
PostPosted: December 24th, 2010, 1:51 pm 
Offline

Joined: April 30th, 2008, 8:20 pm
Posts: 2
This script is gold. I was about to create one to do the same (task swithing by typing the title of the window).

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:
Code:
CapsLock::

Add:
Code:
~LWin::
Send {Esc}


Add:
Code:
    if ErrorLevel = EndKey:lwin
    {       
        Gui, cancel
   Send {LWin}
        break
    }

    if ErrorLevel = EndKey:rwin
    {
       
        Gui, cancel
   Send {RWin}
        break
    }


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 6th, 2011, 7:17 am 
Offline

Joined: February 15th, 2007, 12:01 am
Posts: 32
Location: Seattle, WA, USA
Excellent script. I can't wait to stop using alt-tab. However, i can't get the last-used sorting to work.

alias wrote:
@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


Report this post
Top
 Profile  
Reply with quote  
PostPosted: July 28th, 2011, 8:18 pm 
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!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 29th, 2011, 6:08 pm 
Offline

Joined: May 16th, 2011, 2:28 am
Posts: 43
Location: China
http://www.autohotkey.com/forum/viewtop ... highlight=
http://www.autohotkey.com/forum/viewtop ... highlight=


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2011, 1:53 pm 
wow thanks!!


Report this post
Top
  
Reply with quote  
 Post subject: customizing
PostPosted: December 18th, 2011, 11:49 am 
Offline

Joined: September 2nd, 2007, 1:56 am
Posts: 15
Location: urban india = hell
I modified the appearance of the gui in 2 places,

to hide the margin as well as default the colors to system color for background.

[code]Gui, +LastFound +AlwaysOnTop -Caption
Gui,Font,s12 cGreen bold,Verdana
Gui, Margin , 0, 0
Gui, Add, ListBox, vindex gListBoxClick w600 h500 AltSubmit -VScroll [/code]

to make it appear in the center,
[code]Gui, Show, Center h500 w600, Window Switcher [/code]

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!!

_________________
no fate but what we make


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bon and 15 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