Re: [perl-win32-gui] Need Help from Winamp Users

2000-11-09 Thread Aldo Calpini

Todd McLaughlin wrote:
 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.

the problem is simply that WM_USER is not exported by
Win32::GUI. you can manually define it with:

use constant WM_USER = 1024;

or, you can download and use the Win32API::Const module
by Brian Dellert, which exposes all the constants from
the Win32 SDK. for example, you can have access to all
the WM_* constants with this:

use Win32API::Const qw( :WM_ );

cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;






Re: [perl-win32-gui] Need Help from Winamp Users

2000-11-09 Thread Chuck . Hirstius



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 );








Re: [perl-win32-gui] Need Help from Winamp Users

2000-11-09 Thread David Hiltz


  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 );
 
 
 
 
 
 




Re: [perl-win32-gui] Need Help from Winamp Users

2000-11-09 Thread Todd McLaughlin

What was the problem with the volume control?

Todd


On Thu, 9 Nov 2000 [EMAIL PROTECTED] wrote:

 
 
 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 );
 
 
 
 
 
 




Re: [perl-win32-gui] Need Help from Winamp Users

2000-11-09 Thread Todd McLaughlin

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 );
  
  
  
  
  
  
 
 




Re: [perl-win32-gui] Need Help from Winamp Users

2000-11-09 Thread David Hiltz

 There's more features available using SendMessage() than using
 keyboard commands.

  ..such as?

  Is there any documentation on SendMessage and what these numbers mean?

  Win32::GUI::SendMessage( $winampHandle, WM_COMMAND, 40045, 0 );

  Win32::GUI::SendMessage( $winampHandle, WM_USER, 122, 0 );


 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 );
   
   
   
   
   
   
  
  
 
 




Re: [perl-win32-gui] Need Help from Winamp Users

2000-11-09 Thread felice . vittoria

David,

You can goto http://msdn.microsoft.comand then enter WM_COMMAND or WM_USER to
find out more information.That's what I do.

Felice




David Hiltz [EMAIL PROTECTED] on 11/09/2000 01:57:52 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Felice Vittoria/Aut/Schneider)
Subject:  Re: [perl-win32-gui] Need Help from Winamp Users




 There's more features available using SendMessage() than using
 keyboard commands.

  ..such as?

  Is there any documentation on SendMessage and what these numbers mean?

  Win32::GUI::SendMessage( $winampHandle, WM_COMMAND, 40045, 0 );

  Win32::GUI::SendMessage( $winampHandle, WM_USER, 122, 0 );


 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 );
  
  
  
  
  
  
 
 












Re: [perl-win32-gui] Need Help from Winamp Users

2000-11-09 Thread Todd McLaughlin

http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml

The above link has the list of commands Winamp accepts.  The primary
benefit is being able to query Winamp.  Is there a song playing?  What
songs are in the playlist?

Just emulating keyboard presses is more on a one-way communication (stop
and play).

Todd


On Thu, 9 Nov 2000, David Hiltz wrote:

  There's more features available using SendMessage() than using
  keyboard commands.
 
   ..such as?
 
   Is there any documentation on SendMessage and what these numbers mean?
 
   Win32::GUI::SendMessage( $winampHandle, WM_COMMAND, 40045, 0 );
 
   Win32::GUI::SendMessage( $winampHandle, WM_USER, 122, 0 );
 
 
  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 );






   
   
  
  
 
 




RE: [perl-win32-gui] Need Help from Winamp Users

2000-11-09 Thread Steven Manross
Title: RE: [perl-win32-gui] Need Help from Winamp Users





Just ignore the flashing RED GIFs (sexani5.gif) if you are offended by this type of stuff...


Thanks for the link to their API... Very useful stuff...


:)


Steven


-Original Message-
From: Todd McLaughlin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 09, 2000 3:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [perl-win32-gui] Need Help from Winamp Users



http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml
(snip)





Re: [perl-win32-gui] Need Help from Winamp Users

2000-11-09 Thread Chuck . Hirstius



Todd,

The problem was finding a way to determine the volume of winamp at startup so I
could position my volume slider accordingly.  There was no message to retrieve
it, and I thought just forcing it to a certain volume was a cheesy fix - nothing
like setting it low, then restarting and it's blaring again...

I was never offered a solution, so I let the project slip.

Chuck





What was the problem with the volume control?

Todd


On Thu, 9 Nov 2000 [EMAIL PROTECTED] wrote:



 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