Powershell with KODI: Parameters never work unless they are a single character
-
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. -
can anyone help with this?
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