There's more features available using SendMessage() than using
keyboard commands.
Thanks for the heads-up on the module.
Todd
On Thu, 9 Nov 2000, David Hiltz wrote:
>
> Why not try the Win32::Setupsup module which also lets you send keystrokes
> to a window?
>
> > Todd!! I tried the same things! I got fairly close to making a usable
> > interface, but when I asked the winamp folks for help (7 times) I never got a
> > response. I have code I can send if you would like it, it's fairly complete,
> > except for the volume control (which was what I was writing to winamp about) if
> > you would like to see it.
> >
> > The answer to your question is that I had to go to MS's website and get the
> > value of the WM_USER constant, which I then set since it wasn't being exported
> > by Win32::GUI.
> >
> > HTH,
> >
> > Chuck
> >
> > Todd McLaughlin <[EMAIL PROTECTED]> on 11/08/2000 07:37:25 PM
> >
> > Please respond to [EMAIL PROTECTED]
> >
> > To: [EMAIL PROTECTED]
> >
> > cc: (bcc: Chuck Hirstius/Corp/Walgreens)
> >
> >
> >
> > Subject: [perl-win32-gui] Need Help from Winamp Users
> >
> > Winamp published a list of codes to control the program using
> > SendMessage(). The web page is listed in my code below.
> >
> > I can get the set of WM_COMMAND codes to work (stop and play), but not the
> > WM_USERS codes (mute and status. I have no way of knowing if the problem
> > is caused by my code, Win32::GUI, or Winamp. I'd appreciate it if any
> > Winamp users could take a quick look at this.
> >
> > Thanks!
> > Todd
> >
> >
> > use Win32::GUI;
> >
> > #Win32::GUI home: http://dada.perl.it/
> > #Win32::GUI docs: http://dada.perl.it/gui_docs/Win32_GUI.html#Version
> > #Winamp docs: http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml
> >
> > $winampHandle = Win32::GUI::FindWindow("Winamp v1.x", "");
> > print "Handle: $winampHandle\n";
> >
> > ## STATUS ##
> > #print Win32::GUI::PostMessage( $winampHandle, WM_USER, 101, 0 );
> > #print Win32::GUI::PostMessage( $winampHandle, WM_USER, 0, 101 );
> >
> > ## MUTE ##
> > #Win32::GUI::SendMessage( $winampHandle, WM_USER, 122, 0 );
> > #Win32::GUI::SendMessage( $winampHandle, WM_USER, 0, 122 );
> >
> > ## PLAY ##
> > #Win32::GUI::SendMessage( $winampHandle, WM_COMMAND, 40045, 0 );
> >
> > ## STOP ##
> > #Win32::GUI::SendMessage( $winampHandle, WM_COMMAND, 40047, 0 );
> >
> >
> >
> >
> >
> >
>
>