Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

ControlTab


  • Please log in to reply
6 replies to this topic
goshdarn
  • Members
  • 7 posts
  • Last active: Oct 30 2011 11:08 PM
  • Joined: 14 Oct 2011
A built-in ControlTab that works like AltTab, meaning you hold down one key and tap another until you reach the right tab. Like discussed here: http://www.autohotke...pic.php?t=72172

fragman
  • Members
  • 1591 posts
  • Last active: Nov 12 2012 08:51 PM
  • Joined: 13 Oct 2009
This is not a wish-list for scripts, and implementing what would essentially be a script in the AHK interpreter is pointless.

goshdarn
  • Members
  • 7 posts
  • Last active: Oct 30 2011 11:08 PM
  • Joined: 14 Oct 2011
More pointless than the AltTab functionality which is already implemented?

fragman
  • Members
  • 1591 posts
  • Last active: Nov 12 2012 08:51 PM
  • Joined: 13 Oct 2009
I think I didn't quite get what you meant before, but now that I do I still think this would better be implemented as a script. I'd say the same about the built-in AltTab.

Btw, here's some code that should help get you started:
#if GetKeyState("LAlt")
*j::
if(!GetKeyState("LControl"))
	Send {LControl Down}
Send {Tab}
SetTimer, WaitForAltUp, 10
ToolTip trigger
return

WaitForAltUp:
if(!GetKeyState("LAlt", "P"))
{
	Send {LControl Up}
	SetTimer, WaitForAltUp, Off
}
return
It worked properly in all programs I tried except Opera.

goshdarn
  • Members
  • 7 posts
  • Last active: Oct 30 2011 11:08 PM
  • Joined: 14 Oct 2011
Thank you for the script! :p Very much appreciated!

I tried it in a few random applications, and it seems to work very well as long as the application does not use some special way to CtrlTab. Opera and Notepad++ both bring up an AltTab-like menu, and for some reason, the script does not work well with that. But for all I know, if ControlTab were implemented in AHK, it might behave the same way.

The script works great in Firefox, Scite4AutoHotkey, Excel and FoxIt, for example.

For anyone else reading this:
1) I added {Blind} to the Sends to get to use Shift to change the direction of the tabbing.
2) If you have a line like m & a::SendInput asdf, then GetKeyState("m") will not work here, but fortunately GetKeyState("m", "P") will!

I still think that a built-in ControlTab would make life a little easier, but until that time, I am very happy with your script.

Btw, it was also very useful to see the way you used ToolTip and SetTimer.

Btw II: Any reason you use Send and not SendInput? Perhaps you use SendMode Input?

fragman
  • Members
  • 1591 posts
  • Last active: Nov 12 2012 08:51 PM
  • Joined: 13 Oct 2009
It was just a quick and dirty attempt at implementing this behavior, as you see I didn't even took out the tooltip yet :D.

Template Term
  • Members
  • 1 posts
  • Last active: Nov 09 2011 11:34 PM
  • Joined: 09 Nov 2011
Thanks I was also looking for this! :D

Appreciated.