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

    Open YouTube In Chrome, Search and Play Result Fullscreen

    Scheduled Pinned Locked Moved Windows
    3 Posts 2 Posters 3.9k Views 2 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.
    • A Offline
      A McF
      last edited by

      Re: Open YouTube in default broswer and query search term

      The following VBScipt code will accept a search term as a parameter, select and follow a link from the search results, and play the video fullscreen. My web browser is Google Chrome.

      `
      For Each a In WScript.Arguments
      param = param & a & " "
      Next 'a

      param = LCase(Trim(param))
      Set WSS = CreateObject("Wscript.Shell")

      arg = "https://www.google.ca/search?q=" & param & " site:youtube.com"
      strURL = Chr(34) & "C:\Program Files\Google\Chrome\Application\chrome.exe " & Chr(34) & " " & Chr(34) & arg & Chr(34)

      WSS.Run strURL
      WSS.AppActivate "Google Chrome"
      Wscript.sleep 2000

      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300

      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300

      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300

      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300

      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300
      WSS.sendkeys "{TAB}"
      Wscript.sleep 300

      WSS.sendkeys"{enter}"
      Wscript.sleep 7500

      WSS.sendkeys "+{f}"
      Set WSS = Nothing
      `

      A 1 Reply Last reply Reply Quote 0
      • A Offline
        A McF @A McF
        last edited by

        @a-mcf NOTE: The path to Chrome broweser in the code, is that of the 32Bit version and would be different on a 64Bit machine.

        1 Reply Last reply Reply Quote 0
        • Royher FigueraR Offline
          Royher Figuera
          last edited by

          @A-McF / @russ I'm interest in this script but I don't know how start. I made a file .vbs with your code but won´t run and I don´t know how configure triggercmd with that. I supose the trigger is the file and the param is "the search". I´m correct?

          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