INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Powershell Script Question  (Read 898 times)

soundgals

  • Recent member
  • *
  • Posts: 27
Powershell Script Question
« on: November 28, 2019, 07:11:00 am »

Hi,
I have been an MC user for many years and recently paid for the 26 upgrade.

I hope this is the right place to post this.

I've written a Powershell script which interacts with MC and I've run into one problem. My script provokes the "Error Loading Library" dialog.

This pops up due to a timing issue that I have no control over. If I immediately dismiss this by manually clicking Cancel, the 'X' to close the window, or the escape key, my script proceeds without a problem.

I can also achieve this by issuing the command: "& mc25.exe /mcc 27000,27" from my script.

The trouble is this only works some of the time. Probably, again, due to a timing issue.

What I would like to see is a feature whereby these warning messages could be suppressed under MC's options.

For example, under General -> Interface you already have the ability to show or not show onscreen instructions.

Perhaps a further option, such as: "Suppress all warnings" could be added there, or wherever you feel is appropriate.

I'll be very grateful if you seriously consider this for MC26.

Thanks in advance.

Geoff

Logged

millst

  • Galactic Citizen
  • ****
  • Posts: 256
Re: Powershell Script Question
« Reply #1 on: November 28, 2019, 10:43:03 am »

There is an option for "error free" mode in the settings (not in front of my MC computer so that might not be the exact option name). Any chance that helps?
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Powershell Script Question
« Reply #2 on: November 28, 2019, 10:49:50 am »

I don't know any specifics about what you are doing with scripting.  But there should be delay or sleep function in PowerShell that you can call in order to wait out any small timing issues.  1 second, half a second, etc might fix your timing issue.

I've had to do this quite a bit in home theater automation.  I expect the same techniques apply here.

Good luck.

Brian.
Logged
Pages: [1]   Go Up