title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Converting any file - using example vb script...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • higgsy
    • Dec 2003
    • 2

    Converting any file - using example vb script...

    Hi,

    After looking at the example as below, it looks relatively easy to convert an audio file using the COM object. What i dont understand though is the example script is converting a file to a .WAV file, however the sscript never calls the WAVE sub object like so - Set WaveSettings = CreateObject("dMCScripting.WaveSettings"), so when do u ever make a call to these sub objects???

    ' Create dMC Object
    Set dMC = CreateObject("dMCScripting.Converter")

    ' Set My options (Volume norm off, ID Tag Preservation On, No delete Source files)
    dMC.VolumeNormalize = False
    dMC.PreserveTags = True
    dMC.DeleteSourceFiles = False

    ' Set Output Folder (to C:\Conversion123 )
    dMC.ConvertToFolder = True
    dMC.ToFolder = "C:\Conversion123"

    ' Add My Files to Convert
    Call dMC.AddFromFile("C:\AudioFile1.mp3")
    Call dMC.AddFromFile("C:\AudioFile2.mp3")

    ' Convert To Wave (No option page, Want Overwrite page, Want finished, Want Errors)
    Call dMC.GoConversion("Wave", True, False, False, False)




    If i wanted to convert a file to MP3 for example, should i run the following script before calling the dmc.GoConversion

    Set Mp3Settings = CreateObject("dMCScripting.Mp3Settings")
    Call Mp3Settings.Set (160, 44100, 0, 0)

    Thanks in advance

    Al :smile2:
  • Spoon
    Administrator
    • Apr 2002
    • 43896

    #2
    Re: Converting any file - using example vb script...

    You dont need to specify the settings (it will use the last settings, when a user not scripting last set either Wave or Mp3 settings).
    Spoon
    www.dbpoweramp.com

    Comment

    Working...

    ]]>