MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/AutoHotkey/comments/1xmoba2/open_link_in_split_view_edge_browser/
r/AutoHotkey • u/doingsite • Nov 03 '26
https://gist.github.com/simin75simin/b4a26c0c21b1975e4044531570d39040
1 comment sorted by
4
Instead of navigating the context menu with keypresses like a caveman, which is prone to all sorts of errors, you can actually read the context menu and have the script click the desired button.
#Requires AutoHotkey 2.0 #SingleInstance #Include <UIA> #HotIf WinActive("ahk_exe msedge.exe") F8:: { Click("R") Sleep(50) try { edgeEl := UIA.ElementFromHandle("ahk_exe msedge.exe") if edgeEl { splitItem := edgeEl.FindFirst({ Name: "Open link in split screen window", Type: "MenuItem" }) if splitItem { splitItem.Click() return } } } catch { Send("{Escape}") } } #HotIf
Or click the 4th, making it language neutral.
#Requires AutoHotkey 2.0 #SingleInstance #Include <UIA> #HotIf WinActive("ahk_exe msedge.exe") F8:: { Click("R") Sleep(50) try { edgeEl := UIA.ElementFromHandle("ahk_exe msedge.exe") if edgeEl { items := edgeEl.FindAll({ Type: "MenuItem" }) if items.Length >= 4 { items[4].Click() return } } } catch { Send("{Escape}") } } #HotIf
Courtesy of u/Individual_Check4587 (Descolada)s' UIA.
You could even go the extra mile and have it check if you are actually over an URL to begin with.
4
u/Keeyra_ Nov 03 '26 edited Nov 03 '26
Instead of navigating the context menu with keypresses like a caveman, which is prone to all sorts of errors, you can actually read the context menu and have the script click the desired button.
Or click the 4th, making it language neutral.
Courtesy of u/Individual_Check4587 (Descolada)s' UIA.
You could even go the extra mile and have it check if you are actually over an URL to begin with.