Open in a new tab instead of a new window

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
windfancy3
Posts: 8
Joined: 21 Sep 2023, 02:08

Open in a new tab instead of a new window

30 Mar 2024, 00:54

I currently have a requirement that when using VScode or other software to open in a folder or in the explorer, it will reopen a new explorer window instead of opening it as a new tab in an already opened window.

I would like to ask if I can use AutoHotKey to listen for the opening behavior of the explorer.exe, modify its opening behavior when there is already a window to open in a new tab. Or there are other more elegant implementations.
htimsydnar
Posts: 1
Joined: 16 Aug 2024, 10:21

Re: Open in a new tab instead of a new window

16 Aug 2024, 10:23

Also interested in this, if anyone knows a way.
User avatar
mikeyww
Posts: 28870
Joined: 09 Sep 2014, 18:38

Re: Open in a new tab instead of a new window

16 Aug 2024, 12:45

Ideas are below.

Code: Select all

#Requires AutoHotkey v2

F3::dirView(A_MyDocuments)

dirView(dir) {
 Static winTitle := 'ahk_class CabinetWClass'
 If WinExist(winTitle) {
  WinActivate(), Sleep(100)
  ControlFocus('SysTreeView321'), Sleep(100)
  SetKeyDelay(300), SendEvent('^t^l')
  SetKeyDelay(15) , SendEvent('{Text}' dir)
  Sleep(150), Send('`n')
 } Else Run dir
}

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: DavidP, mikeyww, TomDonovan, vanove and 97 guests