ByteScout Image To Video SDK – VBScript – Multiple Instances

  • Home
  • /
  • Articles
  • /
  • ByteScout Image To Video SDK – VBScript – Multiple Instances

ByteScout Image To Video SDK – VBScript – Multiple Instances

multiple.vbs

Set converter1 = CreateObject("BytescoutImageToVideo.ImageToVideo") 
Set converter2 = CreateObject("BytescoutImageToVideo.ImageToVideo") 

converter1.SetLogFile "log1.txt" 
converter2.SetLogFile "log2.txt" 

converter1.AddImageFromFileName("Desert.jpg")
converter1.AddImageFromFileName("Koala.jpg")
converter1.AddImageFromFileName("Penguins.jpg")

converter2.AddImageFromFileName("..\..\slide1.jpg")
converter2.AddImageFromFileName("..\..\slide2.jpg")
converter2.AddImageFromFileName("..\..\slide3.jpg")
    
Set slides1 = converter1.Slides
Set slides2 = converter2.Slides

Set slide1 = slides1.GetSlide(0)
slide1.Effect = 1

Set slide2 = slides2.GetSlide(0)
slide2.Effect = 1

converter1.OutputVideoFileName = "Output1.wmv"
converter2.OutputVideoFileName = "Output2.wmv"

converter2.Run
converter1.Run

while converter1.IsRunning Or converter2.IsRunning
     WScript.Sleep 100
wend

converter1.JoinWMVFiles "output1.wmv", "output2.wmv", "Final.wmv"

msgbox "All threads are done."

Set slide1 = Nothing
Set slides1 = Nothing
Set converter1 = Nothing

Set slide2 = Nothing
Set slides2 = Nothing
Set converter2 = Nothing


' Open the output file in default app
Set shell = CreateObject("WScript.Shell")
shell.Run "final.wmv", 1, false
Set shell = Nothing


  Click here to get your Free Trial version of the SDK

prev
next