Jump to content

Winamp Library [on pure AutoIt]


MrCreatoR
 Share

Recommended Posts

I think perhaps it should be up to the user to supply the proper window handle to the functions. What if I have two Winamp windows open? How would I specify which window I want the functions to act on? Otherwise looks really good, it will be nice to have something that doesn't rely on ActiveWinamp.

Basically i can add an optional parameter to all functions ($hWnd), but in what cases that would be neccessary? i mean why user will run two windows of winamp? :) Edited by MrCreatoR

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • 1 month later...
  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Basically i can add an optional parameter to all functions ($hWnd), but in what cases that would be neccessary? i mean why user will run two windows of winamp? :)

I'm really interested in finding a way of scripting multiple copies of Winamp.

In my situation, I might be running 5 copies of Winamp (think DJ'ing), and what I want is a script that logs to a file every time any instance of Winamp changes to a new track.

I have a suspicion that ActiveWinamp doesn't allow this...so I'm hoping that maybe your stand-alone AutoIt script can!

Thanks!

Link to comment
Share on other sites

what I want is a script that logs to a file every time any instance of Winamp changes to a new track.

I have a suspicion that ActiveWinamp doesn't allow this...

Never mind! I just did more ActiveWinamp RTFM (actually, I Used The Source), and realized that if you name a script startup_*.vbs, it'll automatically run it when Winamp launches. So, I tweaked the included logsong.vbs to not hold the log file open between writes, and I've got exactly what I want now!

Thanks everyone.

Link to comment
Share on other sites

  • 4 months later...
  • 4 months later...

:\Programme\AutoIt3\script\Winamp\Winamp_Library.au3(715,84) : ERROR: Opt() called with illegal argument 1: "RunErrorsFatal"

If $iAutoItVersion_Compare <= 0 Then Local $iOld_Opt_REF = Opt("RunErrorsFatal", 0)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

F:\Programme\AutoIt3\script\Winamp\Winamp_Library.au3(727,74) : ERROR: Opt() called with illegal argument 1: "RunErrorsFatal"

If $iAutoItVersion_Compare <= 0 Then Opt("RunErrorsFatal", $iOld_Opt_REF)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

F:\Programme\AutoIt3\script\Winamp\numpadcontrol.au3(6,25) : ERROR: syntax error

_Winamp_PlayPauseToggle

~~~~~~~~~~~~~~~~~~~~~~~^

F:\Programme\AutoIt3\script\Winamp\numpadcontrol.au3 - 3 error(s), 0 warning(s)

!>13:39:52 AU3Check ended.rc:2

Link to comment
Share on other sites

pixartist

The library was written almost one year ago, lot of things was changed in autoit, so t's ok ^_^ - will fix those errors soon.

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • 4 weeks later...

Library updated!

v1.4 [22.May.2009]

* The library now compatible with AutoIt v3.3.0.0.

* Added optional $h_Winamp_Wnd parameter to all functions that sends message to winamp's window - It should allow to manage multiple winamp instances.

(by default the handle is taken from $sWINAMP_CLASS).

Please see the first post.

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • 5 months later...

Actually I was looking for this. I'm always busy doing other things at my pc and don't watch winamp when im listening to internet radio, often i forget to write down nice songs when I hear them so I made a script that does that for me with the help of your UDF.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=..\Desktop\Winamp Tracklister.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;Winamp lister
;Lists songs that are played in winamp

#include <Winamp_Library.au3>
$hFile=@ScriptDir&'\Tracklist.txt'
While 1
$Track=_Winamp_GetCurrentTrackTitle()
    If stringinstr(FileRead($hFile),$Track)=0 then;No dupes plox
        Filewriteline($hFile,@MDAY&'/'&@MON&'/'&@YEAR&' Time: ' &@HOUR & ':' & @MIN & ":" & @SEC&' - '&$Track&@CRLF)
        FileClose($hFile)
        Endif
Sleep(1000);Update interval
Wend

Simple and Usefull (for me)

Link to comment
Share on other sites

Is it possible to get the artist of the current track? I would really like this so I can add WinAmp Support to one of my apps (LyricToy).

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

  • 5 weeks later...
  • 10 months later...

A new version of the Library is here!

Changes:

; v1.5 [06.October.2010]

; _Winamp_GetCurrentTrackInfo now returns an array as it should have:

; 0: Sample Rate in khz

; 1: Bitrate

; 2: Number of Channels

; 3: Video LOWORD=w HIWORD=h

; 4: Video Description

; 5: Sample rate in hz

; Added 4 new UDFs: _WinampGetPan, _WinampSetPan, _WinampGetEq and _WinampSetEq.

Enjoy,

Erion

Winamp_Library.au3

Link to comment
Share on other sites

  • 2 years later...

Any ideas how to get mute state?

I use _Winamp_GetVolume(), like this..

Func ToggleMute()
    If _Winamp_GetVolume() = 0 Then
        If $WinampTempVolume <> 0 Then
            _Winamp_SetVolume($WinampTempVolume)
        Else
            _Winamp_SetVolume(85)
        EndIf
    Else
        $WinampTempVolume = _Winamp_GetVolume()
        _Winamp_SetVolume(0)
    EndIf
EndFunc

Basically, it mutes if it's not already muted, or sets the volume back to whatever it was before a mute.. I don't think this is exactly what you're after, but maybe this'll help?

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

Tnx, but that's not good solution for me. I'm making remote control on my android device, remote control for winamp on PC, and server on PC (autoit-based) should control winamp and send all winamp data back to my android device. I would like to get REAL winamp mute state, that way I could use different icons on android device for mute and non mute state, also disable scrollbar for volume control on android if winamp is muted.

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...