here's the plugin with the change to the connect command. It should now store the results in {lastResult}
Hi James!
Sorry for the late reply, but I couldn't try your .dll file until today.
I hope you are not going think that you have lost your time, but finally I'm using your event solution instead of the connect command as I realize that it is a more elegant solution. This is how it works:
- If the HTPC is sleep and I tell VC to play an artist, the TryConnect event will be fired.
- The TryConnect event sends a WOL packet and I use the VC.EnableGroup command to enable a group folder where the MPWIFI.Reconnected is placed (I do this to avoid launching VC.TellVox command when I turn on my computer manually)
- When the HTPC has resumed from standby, MPWIFI.Reconnected is fired.
- MPWIFI.Reconnected event will launch the following commands: MpWifi.Connect, VC.TellVox {LastSpoken} and VC.DisableGroup to disable the previously enabled group.
Ok, it seems that everything should work, right? No, it doesn't work
I don't know why but I HAVE to do a full restart of VC when my computer is suspend, if I don't do it the VC.TellVox command will be send but WifiRemote won't receive it. Believe me, I have made lots of test and this is the only option (6am here
). My current setup is: (EG is installed in my HTPC and in the Server)
HTPC is suspended (on.Suspend) -> HTPCs EG sends a network event to Servers EG and (after pausing EG for 4 seconds, really important) a .bat file is launched killing the VoxCommando.exe process and opening the program again. The rest of the procedure is the same. It seems that it is really important to restart VC after the HTPC is completely suspended, that's way I'm using the 4 sec. delay in Servers EG.
Does all this make any sense to you? It's like VC needs to completely close the connection with WifiRemote to be able to parse the VC.TellVox command again after waking up the HTPC :S
Oh, and I have found that if I use this option many times in a short period of time (suspend, tell VC to play an artist, suspend, tell VC, suspend...) VC force closes with the following error:
Consulte el final de este mensaje para obtener más detalles sobre cómo invocar a la depuración
Just-In-Time (JIT) en lugar de a este cuadro de diálogo.
************** Texto de la excepción **************
System.InvalidOperationException: No se puede realizar esta operación mientras el reconocedor está realizando el reconocimiento.
en System.Speech.Recognition.RecognizerBase.InternalEmulateRecognizeAsync(String phrase, SpeechEmulationCompareFlags flag, Boolean useReco2, RecognizedWordUnit[] wordUnits)
en System.Speech.Recognition.RecognizerBase.InternalEmulateRecognize(String phrase, SpeechEmulationCompareFlags flag, Boolean useReco2, RecognizedWordUnit[] wordUnits)
en System.Speech.Recognition.RecognizerBase.EmulateRecognize(String inputText, CompareOptions compareOptions)
en System.Speech.Recognition.SpeechRecognitionEngine.EmulateRecognize(String inputText, CompareOptions compareOptions)
en System.Speech.Recognition.SpeechRecognitionEngine.EmulateRecognize(String inputText)
en VoxCommando.MainWindow.emulateOnString(String strEmulateCommand)
en VoxCommando.MainWindow.doAction(macroElement action, List`1 payloads)
en VoxCommando.MainWindow.doVoxCommand(activeCommand doCommand)
en VoxCommando.MainWindow.doEvent(String strEventName, List`1 payloads)
en VoxCommando.MainWindow.doEvent(String strEventString)
en VoxCommando.MainWindow.backgroundWorkerUDP_ProgressChanged(Object sender, ProgressChangedEventArgs e)
en System.ComponentModel.BackgroundWorker.OnProgressChanged(ProgressChangedEventArgs e)
en System.ComponentModel.BackgroundWorker.ProgressReporter(Object arg)
...
...
Any idea about what's happening here? I'm really lost and I can't find anything else is VCs logs.
Many many thanks for your patient and I'm really sorry for the horrible English I have used in this message, it's too late to think properly. My apologizes.
Best regards James,
Aitor