PDA

View Full Version : dbpoer amp and MS Access



christopherhall
03-20-2007, 05:35 AM
Hi I am trying to use dbpoweramp in connection with MS Access.

I have a script which runs the following line of code only when it reaches this point I get the message:

Object doesn't support this property or method

Is there a reference in Access that I am missing?

Here is the line of code:

dMC = CreateObject("dMCScripting.Converter")


Thanks

Chris

Deano
03-20-2007, 06:00 AM
dMC is an object, thus you'll need to use the VBScript keyword "Set". So the line will need to be:

Set dMC = CreateObject("dMCScripting.Converter")

christopherhall
03-20-2007, 06:21 AM
Thanks for that Deano,

Now another, what I hope is an easy question.

I am calling the following line of code:

Call dMC.Convert(oFile, "Test_MP3_To_WMA_Result\" & Left(oFile.Name, Len(oFile.Name) - 3) & "wma", "mp3 (Lame)", "-b=128", "")

The aim is to convert each mp3 file in a folder to wma.

This runs without any errors although it does not create the wma file.


Thanks

Chris

christopherhall
03-20-2007, 07:02 AM
I have tried running this mannually using dbpowerAmp but am getting the following message:

The CODEC required to compress 'D:\Test_MP3_To_WMA_Result\2474_1_3_clip.wma' could not be opened.

LtData
03-20-2007, 07:33 AM
Did you install the WMA codec into dMC?

christopherhall
03-20-2007, 07:52 AM
Yes,

I can run it through the dppowerAmp front End but when I try to run it using code it does not work?

Chris

christopherhall
03-20-2007, 08:22 AM
OK,

I have started again from scratch, with a simpler script.

Here is what I have:


Function conMp3()

Dim dMC

Set dMC = CreateObject("dMCScripting.Converter")
newFile = "D:\Test_MP3_To_WMA_Result\2474_1_0_clip.mp3"
Call dMC.Convert("D:\Test_MP3_To_WMA\2474_1_0_clip.mp3", newFile, "mp3 (Lame)", "-b=128", "")

End Function

When I run this it gets to the line:


Call dMC.Convert("D:\Test_MP3_To_WMA\2474_1_0_clip.mp3", newFile, "mp3 (Lame)", "-b=128", "")

And gives the error message:

Object doesn't support this property or method


Any help would be great.


Chris

Spoon
03-20-2007, 08:41 AM
>Call dMC.Convert(oFile, "Test_MP3_To_WMA_Result\" & Left(oFile.Name, Len(oFile.Name) - 3) & "wma", "mp3 (Lame)", "-b=128", "")

You are converting to mp3, but giving the file with a .wma extension...You need instead of "mp3 (Lame)", "Windows Media Audio v10" (you will have to look at the help file for wma how to extract the wma command line.

LtData
03-20-2007, 08:43 AM
Did you try looking at the examples here: http://www.dbpoweramp.com/developer-scripting-dmc.htm ?

Moved to the Developer section of this forum

christopherhall
03-20-2007, 09:02 AM
Thanks for your replies.

I have changed the code so that it is trying to change an mp3 into an mp3.


Dim dMC

Set dMC = CreateObject("dMCScripting.Converter")
newFile = "D:\Test_MP3_To_WMA_Result\2474_1_0_clip.mp3"
Call dMC.Convert("D:\Test_MP3_To_WMA\2474_1_0_clip.mp3", newFile, "mp3 (Lame)", "-b=128", "")

However when I try to run this script I am getting the message:

Object doesn't support this property or method.


Any ideas.

Chris

christopherhall
03-20-2007, 11:34 AM
Hi,

Sorry about this but does anyone have any ideas?

It could be a show stopper and I will have to move away from dbpowerAmp


Chris

Spoon
03-20-2007, 12:57 PM
Tried using the code here unchanged (except for filenames)?

http://www.dbpoweramp.com/developer/dMC-Scripting%20vb%20.NET.txt

christopherhall
03-21-2007, 03:56 AM
Hi,

Yes I have tried that. One of the first things that I had to do was to put SET infront of dMC = CreateObject("dMCScripting.Converter").

That now works but when I try to CALL dMC.Convert I am getting an error.


Chris

bhoar
03-21-2007, 07:54 AM
EDIT:

0. Try it without the "Call " prefix and see if that makes a difference.

If not...

1. Does this file really exist at this filepath? "D:\Test_MP3_To_WMA\2474_1_0_clip.mp3"

2. Does this directory really exist at this path: "D:\Test_MP3_To_WMA_Result"

3. Does the current user have read privileges in the input directory?

4. Does the current user have write privileges in the output directory?

-brendan