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

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

General Discussion
1
2
93
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
    itsmeblake
    last edited by Jan 7, 2024, 11:15 AM

    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 Mar 5, 2024, 10:59 PM Reply Quote 0
    • I
      itsmeblake @itsmeblake
      last edited by Mar 5, 2024, 10:59 PM

      can anyone help with this?

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