• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Ctrl+W closes Chrome entirely instead of just a single tab

General Discussion
2
5
1.2k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    kellanist
    last edited by Mar 7, 2020, 10:12 PM

    Created a vbs to close a tab in Chrome using Ctrl+W.

    Dim Wsh
    Set Wsh = Wscript.CreateObject("Wscript.Shell")
    Wsh.SendKeys "^{W}"

    When I run it, it closes the entire Chrome window instead of just the single tab and I have no idea why.

    1 Reply Last reply Reply Quote 0
    • K
      kellanist
      last edited by Mar 11, 2020, 1:36 PM

      @Russ any ideas on how to direct the command at the Chrome window?

      R 1 Reply Last reply Mar 11, 2020, 1:56 PM Reply Quote 0
      • R
        Russ @kellanist
        last edited by Russ Mar 11, 2020, 1:57 PM Mar 11, 2020, 1:56 PM

        @kellanist, I don't know why CTRL+W closes Chrome, but I did find that CTRL+F4 works to close a single tab:

        Dim Wsh
        Set Wsh = Wscript.CreateObject("Wscript.Shell")
        Wsh.SendKeys "^{F4}"
        

        Russell VanderMey

        K 1 Reply Last reply Mar 13, 2020, 5:24 PM Reply Quote 0
        • K
          kellanist @Russ
          last edited by Mar 13, 2020, 5:24 PM

          @Russ That worked brilliantly!!!! It also solved another issue I had been having. When programming a button on my Logitech keyboard, Ctrl+W wouldn't "select" the Chrome window again after it closed the tab. Ctrl+F4 worked much better than Ctrl+W.

          THANK YOU!!! Now I feel like I'm on the Enterprise. I can just yell at the computer to do everything.

          R 1 Reply Last reply Mar 13, 2020, 8:25 PM Reply Quote 0
          • R
            Russ @kellanist
            last edited by Mar 13, 2020, 8:25 PM

            @kellanist, sweet! I'm glad that worked out.

            Russell VanderMey

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post