|
-
Aug 18th, 2008, 12:50 PM
#1
Thread Starter
New Member
VB to control WME auto restart - Help Please
Hello, I would like some help with the following,
I am trying to auto start 3 different WME live streams using .bat and .VB files.
Here is how I have this set up so far.
IN Startup IN am starting startencoding.bat
This contains :
-----------------
call startencoding1.bat
call startencoding2.bat
call startencoding3.bat
------------------
These 3 .bat files contain this each with a different .wme file name to launch:
------------------
START /min C:\FDBR.wme
dir c:\ /s > nul
dir c:\ /s > nul
dir c:\ /s > nul
wscript.exe C:\reconnect.vbs
---------------
This calls the reconnect.vbs
----------------
On Error Resume next
Set EncoderAgent = CreateObject("WMEncAgt.WMEncoderAgent", "127.0.0.1")
Set Encoder = EncoderAgent.GetEncoder(EncoderAgent.EncoderNamesCollection.Item(0))
'WMENC_ENCODER_STARTING = 1
'WMENC_ENCODER_RUNNING = 2
'WMENC_ENCODER_PAUSED = 3
'WMENC_ENCODER_STOPPING = 4
'WMENC_ENCODER_STOPPED = 5
'WMENC_ENCODER_END_PREPROCESS = 6
While 1=1
Select Case Encoder.RunState
Case 5
WScript.Sleep 5000
Encoder.Start
End Select
WScript.Sleep 1800
Err.Clear
Wend
--------------------
When I run this, it brings up all 3 WME live programs. The first instance of the WME program works fine, when you click on the stop, it auto restarts. When you click stop on the other 2, the vb script does not seem to be working, and does not restart it.
So my question, what is the Best way to set this up to get all 3 .vb scripts to work, or different instances?
I have already tried 3 different named reconnect.vbs's and this did not work :-(
Any suggestions would be Greatly Appreciated!
Regards
David
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|