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

    Powershell with KODI: Parameters never work unless they are a single character

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 1 Posters 501 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.
    • I Offline
      itsmeblake
      last edited by

      I use a series of PowerShell scripts to control Kodi in windows. This particular one has param enabled and should perform a "global search" on device: Master with Voice Word: Searching (search is used by something else).

      param([string]$search)
      $wshell = New-Object -ComObject wscript.shell;
      $wshell.AppActivate('kodi') ## opens the active kodi window ##
      Sleep 1
      $wshell.SendKeys('{/}') ## sends the hot key to open global search ##
      Sleep 1
      $wshell.SendKeys("$search") ## sends value of the parameter ##
      sleep 1
      $wshell.SendKeys('{enter}') ## presses enter ##

      • When I run this from the triggercmd GUI it works exactly as expected.
      • When I try "... with parameter X." it works and does a search for anything named "X."
      • If i try any word for example "Hercules" it wont work.

      if I try
      "Alexa, ask TRIGGERcmd to run searching on master with parameter Hercules." (should search for anything named Hercules)

      Alexa says
      "I cannot find a computer with the voice word master Hercules.

      I 1 Reply Last reply Reply Quote 0
      • I Offline
        itsmeblake @itsmeblake
        last edited by

        can anyone help with this?

        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