PDA

View Full Version : Player.Position not working - how to set position of player in track?



pvh
08-08-2005, 05:47 AM
According to the instructions in the scripting guide (http://www.dbpoweramp.com/developer-scripting.htm) you should be able to set the position of the Audio Player in a track using the Player.Position() method. However, when I try this from VBScript I get an error message saying that the object has no such a method.

Here is the code I'm using:

Sub Forward1Second()

Set Player = CreateObject("dbPowerAMP.Multiplayer")
Player.FilePlaying = "C:\AllDocs\PETER\Research\CubaHeights\52residents_ sideB.ogg"
Player.Pause = True
Position& = Player.Position
Position = Position + 1000
Call Player.Position(Position)
Player.Pause = False
End Sub

The reason I am writing this code is that I am currently busy transcribing some research interviews, and I would like to be able to control the dBPowerAmp Audio Player from within Microsoft Word. I have a standard keyboard with no special keys, but I want to bind keys to macros such as the one above in Word in order to have specific functions (e.g. pause/unpause and skip forward 1 second / skip backwards 1 second).

I also tried using Player.Position = Position, but that seems to do nothing.

Thanks for any advice!

Peter

LtData
08-08-2005, 07:21 AM
If you download the latest dAP beta, you can set up what are sometimes called "Global Hotkeys" to where you can stop, play, pause, unpause, etc. dAP without bringing it into focus. This requires a combination of Ctrl-Alt and then another key, except, of course, Delete. Would this meet your needs?

Spoon
08-08-2005, 03:14 PM
>Call Player.Position(Position)

It is this line that shows the error?

donny
08-09-2005, 09:15 AM
shouldn't this be used as:

player.position = position

I'll check it out later, but I think this is the way I used it.

pvh
08-10-2005, 05:35 AM
>Call Player.Position(Position)

It is this line that shows the error?

Yes

and to answer the other person's post, if i do:

Player.Position = Position

the value of Player.Position doesn't change.

pvh
08-10-2005, 05:42 AM
If you download the latest dAP beta, you can set up what are sometimes called "Global Hotkeys" to where you can stop, play, pause, unpause, etc. dAP without bringing it into focus. This requires a combination of Ctrl-Alt and then another key, except, of course, Delete. Would this meet your needs?

I've checked it out, and it works to some extent. There are no hotkeys for skipping forwards / backwards in time rather than percentage, though.