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.1k
    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.
    • kellanistK
      kellanist
      last edited by

      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
      • kellanistK
        kellanist
        last edited by

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

        RussR 1 Reply Last reply Reply Quote 0
        • RussR
          Russ @kellanist
          last edited by Russ

          @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

          kellanistK 1 Reply Last reply Reply Quote 0
          • kellanistK
            kellanist @Russ
            last edited by

            @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.

            RussR 1 Reply Last reply Reply Quote 0
            • RussR
              Russ @kellanist
              last edited by

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

              Russell VanderMey

              1 Reply Last reply Reply Quote 0
              • First post
                Last post