title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Player.Position not working - how to set position of player in track?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pvh

    • Aug 2005
    • 3

    Player.Position not working - how to set position of player in track?

    According to the instructions in the scripting guide 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
    dBpoweramp Guru

    • May 2004
    • 8288

    #2
    Re: Player.Position not working - how to set position of player in track?

    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?

    Comment

    • Spoon
      Administrator
      • Apr 2002
      • 44509

      #3
      Re: Player.Position not working - how to set position of player in track?

      >Call Player.Position(Position)

      It is this line that shows the error?
      Spoon
      www.dbpoweramp.com

      Comment

      • donny
        dBpoweramp Guru

        • Oct 2002
        • 761

        #4
        Re: Player.Position not working - how to set position of player in track?

        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.

        Comment

        • pvh

          • Aug 2005
          • 3

          #5
          Re: Player.Position not working - how to set position of player in track?

          Originally posted by Spoon
          >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.

          Comment

          • pvh

            • Aug 2005
            • 3

            #6
            Re: Player.Position not working - how to set position of player in track?

            Originally posted by LtData
            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.

            Comment

            Working...

            ]]>