Results 1 to 3 of 3

Thread: Need help with ActiveWinamp plugin

  1. #1
    Maximum Bitrate
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    520

    Need help with ActiveWinamp plugin

    I'm using AutoIt, but I guess the case should be relatively easy.

    I did take a look at the plugin dll with DLL Export viewer. This is what I got:

    Code:
    IApplication
    -----------
    ChangedStatus
    ChangedTrack
    ChangedVolume
    PlaybackEOF
    CancelTimer
    ExecVisPlugin
    GetIniDirectory
    GetIniFile
    GetSendToItems
    GetWaVersion
    Hwmn
    LoadItem
    MediaLibrary
    Panning
    Pause
    Play
    Playlist
    PlayState
    Position
    PostMsg
    Previous
    Repeat
    RestartWinamp
    RunScript
    SayHi
    SendMsg
    SendTimeout
    ShowNotification
    Shuffle
    Skin
    Skip
    StopPlayback
    UpdateTitle
    Volume
    
    IPlaylist
    --------
    Clear
    Count
    DeleteIndex
    FlushCache
    GetSelection
    Hwnd
    Item
    Position
    PostMsg
    SendMsg
    SwapIndex
    
    IMediaItem
    -----------
    Album
    Artist
    ATRString
    DbIndex
    Enqueue
    Filename
    Genre
    Insert
    LastPlay
    Length
    Name
    Playcount
    Position
    Rating
    RefreshMeta
    Title
    Track
    GetItem
    Hwnd
    Item
    PostMsg
    RunQueryArray
    SendMsg
    
    ISiteManager
    -------------
    arguments
    AttachEvents
    Desctiption
    Quit
    
    _IApplicationEvents
    -------------------
    ChangedStatus
    ChangedTrack
    ChangedVolume
    PlaybackEOF
    As you can see there are a few categories:
    IApplication
    IPlaylist
    IMediaItem
    ISiteManager
    _IApplicationEvents

    "play" is an IApplication command. The following code works:
    Code:
    $winamp=ObjCreate("ActiveWinamp.Application")
    $winamp.play
    I guessed I could create a new object for IPlaylist, something like:
    Code:
    $winamp=ObjCreate("ActiveWinamp.Playlist")
    $winamp.clear
    This DOESN'T work, though. I had to code it like this:
    Code:
    $winamp=ObjCreate("ActiveWinamp.Application")
    $winamp.playlist.clear
    This works. So far so good. I can access application and playlist commands. Now I want to access MediaItem commands.
    I thought it would work the same, like this:
    Code:
    $winamp=ObjCreate("ActiveWinamp.Application")
    $album=$winamp.mediaitem.album
    But I always get an object error. Seems I didn't understand the principle. Can someone explain it to me, plase ?

  2. #2
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    771
    I am posting this response with zero knowledge of AutoIt, and zero knowledge of any WinAMP plugins.

    Code:
    $winamp=ObjCreate("ActiveWinamp.Application")
    $album=$winamp.mediaitem.album
    I would assume that MediaItem is going to be an item in the playlist. But which item? So my first guess is that MediaItem is an array (or collection). So maybe try MediaItem(0) or MediaItem(1)

    If that's not the case, you could try being more granular.
    Code:
    $winamp=ObjCreate("ActiveWinamp.Application")
    $mItem=$winamp.mediaitem
    $album=$mItem.album

  3. #3
    Constant Bitrate
    Join Date
    Feb 2007
    Location
    Taylorsville, UT
    Posts
    120
    I am also posting this response with zero knowledge of AutoIt, and zero knowledge of any WinAMP plugins.

    Looks like Playlist is an object under application. That makes sense as to why you need to go Application.Playlist.

    "MediaItem" is NOT an object under Application, BUT there is an object called "Item" under playlist. I would guess that this is an indexed property that returns things that conform to IMediaItem

    So try accessing like:

    Code:
    $winamp=ObjCreate("ActiveWinamp.Application")
    $mItem=$winamp.playlist.item(0)
    $album=$mItem.album
    
    or 
    
    $winamp=ObjCreate("ActiveWinamp.Application")
    $mItem=$winamp.playlist.item[0]
    $album=$mItem.album

    (note sure if it uses () or [] for index accesses.)


    Then you would obviously increment the 0 to access other items.
    -James
    Car: 2004 GTI VR6 24v Turbo 2.8L, GT35R, 630cc, Unitronic, Bosch 044, etc, etc..
    Main PC:i7 920@4Ghz, 6GB DDR3, MSI X-58 Pro-E, Win 7 x64 RTM, Scythe Mugen2, 128GB G.Skill Falcon, 2x ATI4850 512MB Crossfire, Auzentech X-Fi Forte, Grado Labs SR-80

Similar Threads

  1. music defaults to first song on open
    By soundman98 in forum Road Runner
    Replies: 18
    Last Post: 11-23-2009, 03:36 AM
  2. Replies: 13
    Last Post: 05-28-2009, 04:18 PM
  3. Replies: 63
    Last Post: 03-10-2009, 08:49 PM
  4. pc reboot on sd startup
    By duanes7 in forum StreetDeck
    Replies: 3
    Last Post: 12-14-2007, 09:55 AM
  5. IRMAN plugin
    By knyarko in forum StreetDeck
    Replies: 3
    Last Post: 01-05-2007, 09:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •