News:

There is a soft-mute function which we use with the commands like "What song is this?" There is one for system volume, one for each of: MediaMonkey, XBMC, iTunes, MediaPortal.

Main Menu

Help! My Vox isn't running a command except for via the green arrow in cmd edit!

Started by 01ste02, March 01, 2016, 01:13:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

01ste02

I can do it, but my parents won't let me do it over TeamViewer, can we please do it over Skype with screen-sharing?

15:30 my time is okay (9:30 am for you). I will PM you with my skype id, so that you can call me then.

Oskar
What you can´t do now... Go learn it!

jitterjames

Yes. It will cause the exact issue that you are having. That is what I am telling you.  Once loaded, it is always loaded even after you resume from hibernation. I'm telling you that the problem is created by you loading it more than once. Stop loading that script more than once and your problem will go away.

You can still call the functions to close and open the serial port but don't execute the script more than once.

01ste02

Ok, I will try that in one hour. If the problem persists will the "support-time" still be on?
What you can´t do now... Go learn it!


jitterjames

Quote from: jitterjames on March 02, 2016, 09:21:24 AM
I can say that it looks like you are redefining the serial port which was already defined when the script ran on the VC.Loaded event.  As soon as you redefine the Serial port you have created a new instance of it and have lost the handle to the original object which means you can no longer close it!  (I think).

Since your script is defining a gloabal variable for the serial port, make sure that you only run that script once, and all your other scripts can continue to use it.


As I suspected, this problem was resolved by not running the python script (which creates the serial port object) repeatedly.  It should only be run once on VC.Loaded and never after that.  The port can be opened and closed repeatedly but the port itself should not be recreated when it is already open or we lose the ability to close it except by restarting VC.