Submitinput, ^{F4} or ^w

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Bridge
Posts: 18
Joined: 09 Apr 2016, 21:00

Submitinput, ^{F4} or ^w

26 Sep 2021, 13:28

If I have several open tabs on either chrome or edge browsers and hand-keyboard enter Control-W, or Control F4, a single browser tab will close. The browser and other tabs remain open.

Hand-keyboard entry of Alt F4 will close the browser and all tabs.

My script includes a
"Sendinput, ^w" or "Sendinput, "^{F4}" command
The script Sendinput command (above) shuts down the whole browser and and all tabs.

Anyone know why the keyboard entry gets different results than the same command via script?

Background:
windows 10, chrome or Edge. All current updates
The commands above have worked correctly in the past.

Thanks for any ideas.
User avatar
mikeyww
Posts: 26883
Joined: 09 Sep 2014, 18:38

Re: Submitinput, ^{F4} or ^w

26 Sep 2021, 13:32

I had no problem with the following.

Code: Select all

#IfWinActive ahk_exe chrome.exe
^F3::
Send ^w
SoundBeep, 1500
Return
#IfWinActive
Unfortunately, Chrome is designed so that the browser closes when you close the last tab.

Post your script for feedback about it.
Bridge
Posts: 18
Joined: 09 Apr 2016, 21:00

Re: Submitinput, ^{F4} or ^w

26 Sep 2021, 13:47

Ignore question! The problem appears to be a conflicting command somewhere in the script. :oops:
Sorry for wasting someone's time :silent:

Thanks just for being here!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: AHK_user, Google [Bot] and 262 guests