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

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

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 2 Posters 2.0k Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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 Offline
              Russ @kellanist
              last edited by

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

              Russell VanderMey

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post