Scroll through tabs?

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
User avatar
IneedHelp
Gold Member
Gold Member
Posts: 612
Joined: 2010 Feb 04, 02:15
Location: MeanWhile City

Scroll through tabs?

Post by IneedHelp »

Could you make it possible in future versions of x2 to scroll through opened tabs?

I know I can currently use Ctrl+Alt+Left/Right to navigate through tabs, but mouse scrolling support would be nice too, especially for those which have the habit of keeping a dozen or two opened. Image

I've seen that this is possible in XYplorer and thought that it would be a good (minor/subtle) addition to x2, but yeah, probably not important enough to deserve a separate thread.
User avatar
Thracx
Silver Member
Silver Member
Posts: 263
Joined: 2004 Nov 05, 19:33
Contact:

Re: Scroll through tabs?

Post by Thracx »

IneedHelp wrote:...scroll through opened tabs?

I know I can currently use Ctrl+Alt+Left/Right to navigate through tabs, but mouse scrolling support would be nice too...
You can customize the keyboard shortcut from Window -> Customize Keyboard -> Miscellaneous (33038, 33039), however, it does not look like you can use MouseButtons as shortcuts.  Maybe Nikos will consider adding support for using MouseButtons in shortcut keys?

In the meantime, this would be pretty easy to do this in AHK.
Here's my first attempt at a solution, seems to work well for me:

Code: Select all

; <http://forum.zabkat.com/viewtopic.php?t=9050>
; TODO:  Send X² the actual WinMsg instead of automating the keystrokes...
window_Xplorer := "ahk_class ATL:ExplorerFrame"
~^WheelDown::
IfWinActive %window_Xplorer%
{
    ; SendMessage, 0x?, 33038, ?
    Send, {CtrlDown}{AltDown}{Right}{AltUp}{CtrlUp}
}
return

~^WheelUp::
IfWinActive %window_Xplorer%
{
    ; SendMessage, 0x?, 33039, ?
    Send, {CtrlDown}{AltDown}{Left}{AltUp}{CtrlUp}
}
return
(RefA)

This script simply intercepts the Ctrl+ MouseWheelUp or MouseWheelDown events (and if the active window is X²) then it sends the default shortcut keys defined for switching to the next/prev tabs.  The 'Send' command would look a lot prettier if you defined an easier-to-emulate shortcut in X²'s settings, but that's not needed.

Also, a better version of this would send the actual message that X² expects (33038 & 33039) using AHK's SendMessage command.  However, I've forgotten how to do this correctly so I'll leave that to another forum user, or to you as an exercise ;-)
-Thracx

"Man wants to know, and when he ceases to do so, he is no longer a man."
-Fridtjof Nansen
User avatar
snakebyte
Gold Member
Gold Member
Posts: 430
Joined: 2003 May 07, 07:14
Location: Seattle
Contact:

Post by snakebyte »

Similar to Thracx, I have following lines in my ahk global script which allows me to scroll through the X2 tabs with Ctrl + wheel actions.

Code: Select all

#IfWinActive, ahk_class ATL:ExplorerFrame

	;Switch to Right Tab
	^WheelUp:: SendMessage, 0x0111 , 33039 , 0, ,ahk_class ATL:ExplorerFrame

	;Switch to Right Tab
	^WheelDown:: SendMessage, 0x0111 , 33038 , 0, ,ahk_class ATL:ExplorerFrame
	
#IfWinActive
Help! I'm an AI running around in someone's universe simulator.
Post Reply