Old 17th July 2010, 22:43   #1
alamata
Junior Member
 
Join Date: Oct 2006
Posts: 6
Ipc_writeplaylist

hey,...

here is the situation ,..;

i would like simply to save a playlist in a specific directory without a GUI intervention,...

i take a look at the wa_ipc.h in the sdk
and i've found

#define IPC_WRITEPLAYLIST 120

int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_WRITEPLAYLIST);

and

HWND hwndWinamp =FindWindow(L"Winamp v1.x", NULL);


but i can't use that at this moment,...:

what is the way to be able to use that "command"

for saving a playlsit in a specific directory without GUI intervention,...

thanks for your comprehension,...
alamata is offline   Reply With Quote
Old 18th July 2010, 06:51   #2
alamata
Junior Member
 
Join Date: Oct 2006
Posts: 6
i have try an other way too,...

using gen_scripting.dll

from http://www.pretentiousname.com/gen_scripting/index.html

i have try this,...in a vbscript file


code:
option explicit
Dim winamp
Set winamp = CreateObject("gen_scripting.WinAmp")
winamp.ButtonStop



it is ok,...

but with

code:
option explicit
Dim winamp
Set winamp = CreateObject("gen_scripting.WinAmp")
winamp.WritePlaylist()



i have no result,...

what is wrong ?.....
alamata is offline   Reply With Quote
Old 23rd July 2010, 14:59   #3
DrO
 
Join Date: Sep 2003
Posts: 27,873
the documentation for IPC_WRITEPLAYLIST isn't quite right now so..

IPC_WRITEPLAYLIST works by saving winamp.m3u8/m3u into the ini directory which is usually %appdata%\Winamp or %winampdir% (which is the program folder) or a custom winamp m3u directory (all of this is controlled by paths.ini in the winamp folder). this will most likely explain why you're not seeing anything being created as you're looking in the wrong location (something to be fixed in the documentation at some point).

if done with an in-process plug-in then it's simple to get the correct path for winamp.m3u8/m3u. however as you're doing it externally from what i can gather, you can either use a ReadProcessMemory(..) based method to access the in-process functions from an external dll or just parse the paths.ini entries as required to get the correct path.

-daz
DrO is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump