Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Skinz 0.1

 [1/9] from: tbrownell::shaw::ca at: 22-Feb-2002 21:04


So, can't find an mp3 API (xaudio had/has one coming this quarter www.xaudio.com), but what I did find was the API for winamp. So for this experiment we'll have View control Winamp. First thing is determining the winamp window, then we can pass messages to it. Question: How do we get the Winamp handle using this excerpt below as a guide... What I don't get is how do we search a window title to find a name with a particular string in it, in this case "Winamp v1.x" Heres a start.. TheLib: %user32.dll LoadLib: load/library TheLib ; Your code here. hehe ... (The complete winamp api article is here... http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml)
<snip>
External applications can find the Winamp window using the following pieces of code: C/C++: HWND hwndWinamp = FindWindow("Winamp v1.x",NULL); VBasic: Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Dim hwndWinamp as long hwndWinamp = FindWindow("Winamp v1.x",vbNullString) Delphi Pascal: var hwndWinamp : THandle; hwndWinamp := FindWindow('Winamp v1.x', nil); Note that this code uses the FindWindow() function to find a window of any title whose class name is "Winamp v1.x". All versions of Winamp 1.x and 2.x have the class "Winamp v1.x", unless changed using the /CLASS= switch (see above). Note that if you want to run multiple Winamp's and easily tell the difference between them, you can use the /CLASS= switch. </snip> TB

 [2/9] from: info:id-net:ch at: 23-Feb-2002 8:20


If Rebollers want to take advance in the direction of working on winamp, people should know that winamp is expected to release a winamp 3 that is really different of winamp1.x and 2.x, specially for skins. The old skins wont work with this new version. Philippe ----- Original Message ----- From: "Terry Brownell" <[tbrownell--shaw--ca]> To: <[rebol-list--rebol--com]> Sent: Saturday, February 23, 2002 6:04 AM Subject: [REBOL] Skinz 0.1
> So, can't find an mp3 API (xaudio had/has one coming this quarter
www.xaudio.com), but what I did find was the API for winamp. So for this experiment we'll have View control Winamp.
> First thing is determining the winamp window, then we can pass messages to
it.
> Question: How do we get the Winamp handle using this excerpt below as a
guide... What I don't get is how do we search a window title to find a name with a particular string in it, in this case "Winamp v1.x"
> Heres a start.. > > TheLib: %user32.dll > LoadLib: load/library TheLib > ; Your code here. hehe > > ... > (The complete winamp api article is here...
http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml)
> <snip> > External applications can find the Winamp window using the following
pieces of code:
> C/C++: > HWND hwndWinamp = FindWindow("Winamp v1.x",NULL); > > VBasic: > > Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
> Dim hwndWinamp as long > hwndWinamp = FindWindow("Winamp v1.x",vbNullString) > > Delphi Pascal: > > var hwndWinamp : THandle; > hwndWinamp := FindWindow('Winamp v1.x', nil); > > Note that this code uses the FindWindow() function to find a window of any
title whose class name is "Winamp v1.x". All versions of Winamp 1.x and 2.x have the class "Winamp v1.x", unless changed using the /CLASS= switch (see above). Note that if you want to run multiple Winamp's and easily tell the difference between them, you can use the /CLASS= switch.

 [3/9] from: info:id-net:ch at: 23-Feb-2002 9:52


The version beta of winamp is already available for developpers and specially people who want to make skinz Philippe

 [4/9] from: greggirwin:mindspring at: 23-Feb-2002 10:54


Hi Terry, << Question: How do we get the Winamp handle using this excerpt below as a guide... What I don't get is how do we search a window title to find a name with a particular string in it, in this case "Winamp v1.x" >> Here are working calls for FindWindow. The -by-name and -by-class versions should really have wrappers so you don't have to pass the 0 parameter, but I have to run off to a wedding here... win-user: load/library %user32.dll find-window: make routine! [ ClassName [string! integer!] WindowName [string! integer!] return: [integer!] ] win-user "FindWindowA" find-window-by-class: make routine! [ ClassName [string!] WindowName [integer!] return: [integer!] ] win-user "FindWindowA" find-window-by-name: make routine! [ ClassName [integer!] WindowName [string!] return: [integer!] ] win-user "FindWindowA" print find-window "REBOL" "REBOL/View" print find-window-by-name 0 "REBOL/View" print find-window-by-class "Winamp v1.x" 0 I couldn't find any suitable MP3 stuff myself when I looked. A few things that might be a starting point, but I haven't taken the time to dig into them. --Gregg

 [5/9] from: greggirwin:mindspring at: 23-Feb-2002 10:39


Hi Philippe, I think Terry wants to write a /View app that controls winamp remotely, and to create skins for the /View app. --Gregg

 [6/9] from: tbrownell::shaw::ca at: 23-Feb-2002 17:08

Re: Skinz 0.1 (API Tutorial)


It would appear that the word WM_COMMAND must be sent as a string? (An excerpt from the Python link... # wonder why win32 imports dont define these WM_COMMAND = 0x0111 WM_USER = 0x400 WA-Command: make routine! [ hwnd [integer!] WM_COMMAND [Integer!] ] win-user "SendMessageA" WA-Command wahwnd 40047 halt Dont know if this helps... Python Winamp controller.. http://www.shalabhchaturvedi.com/creations/winamp.py.txt

 [7/9] from: tbrownell:shaw:ca at: 23-Feb-2002 16:41

Skinz 0.1 (Now an API Tutorial)


Just checking out the skins on the Etienne web site, very nice. Perhaps we could use those as default skins for the player to aid others in designing their own. It's possible to hide Winamp altogether (under preferences in Winamp) and have Rebol controll the app. I'm sure a nicely skinned Rebol could add a layer of function on top of Winamp.It'd be cool if we could get some sort of visualization thing happening in a pane as well, not sure. We have the API working to determine the winamp window, but can't get the WM_COMMAND function to kick in. Any ideas? (Again, heres the url for api info... http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml ) Here's what we have so far... Rebol [] win-user: load/library %user32.dll find-window: make routine! [ ClassName [string! integer!] WindowName [string! integer!] return: [integer!] ] win-user "FindWindowA" find-window-by-class: make routine! [ ClassName [string!] WindowName [integer!] return: [integer!] ] win-user "FindWindowA" find-window-by-name: make routine! [ ClassName [integer!] WindowName [string!] return: [integer!] ] win-user "FindWindowA" print find-window "REBOL" "REBOL/View" print find-window-by-name 0 "Winamp" wahwnd: find-window-by-class "Winamp v1.x" 0 ;>>> Begin debuggin here :) WA-Command: make routine! [ hwnd [integer!] WM_COMMAND [Integer!] ] win-user "SendMessageA" WA-Command wahwnd 400 halt ;End Not exactly sure where the problem lies with the WA-Command routine, but it sure don't work. TB

 [8/9] from: greggirwin::mindspring::com at: 25-Feb-2002 13:08


Hi Terry, << We have the API working to determine the winamp window, but can't get the WM_COMMAND function to kick in. Any ideas? (Again, heres the url for api info... >> This seems to work: send-message: make routine! [ hWnd [integer!] wMsg [integer!] wParam [integer!] lParam [integer!] return: [integer!] ] win-user "SendMessageA" WM_COMMAND: to-integer #{00000111} winamp-hwnd: find-window-by-class "Winamp v1.x" 0 print send-message winamp-hwnd WM_COMMAND 40029 0 --Gregg

 [9/9] from: robert:muench:robertmuench at: 3-Mar-2002 12:50

Re: Skinz 0.1


> -----Original Message----- > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]On Behalf Of
<<quoted lines omitted: 5>>
> www.xaudio.com), but what I did find was the API for winamp. So for > this experiment we'll have View control Winamp.
Hi, I want to get a Rebol based MP3 player as well. I went out and found the following MP3 library: http://www.mars.org/home/rob/proj/mpeg/ I was able to get the first part compiled with the great DigitalMars C++ compiler http://www.digitalmars.com but didn't continue yet. Maybe it's time to pick it up again. The API could be made easy so that Rebol can play back MP3 files. I'm not sure about the things like a visual equalizer etc. For this some information about the current MP3 files needs to be send back to Rebol, which than can create some nice visual effects. Robert

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted