Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Foobar2k through command-line or sendmessage: jumptoposition x (Read 2431 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar2k through command-line or sendmessage: jumptoposition x

Hi, I'm trying to embed a track slider into my windows interface (Litestep). I'm already using command line to call the usual play, stop, pause etc etc.

What I need is a commandline or sendmessage that will allow me to jump to a given number of seconds through the playing song. All I've found so far is skip forward/backward which isn't what I need. Something like

foobar2000.exe /jumptoposition 50

would be what I need...

Does any way exist for me to do this?

The plugin foo_remote looked like it might have something, but I'm not sure it's what I need and I'd rather do it without plugins.


[edit] Oh, and in the interest of further niceties, is it possible to set volume to x in a similar method to the above? Once again there's go up and down, but no set.

Thanks a lot for your time in reading, and any insight you might be able to provide me.

(p.s. Sorry if this is in the wrong forum, feel free to move it if you need to)

Foobar2k through command-line or sendmessage: jumptoposition x

Reply #1
I got a bit furher... Foo_Winamp_IPC seems to have some things I could call with sendmessage:

IPC_JUMPTOTIME Set the position of the current song.
IPC_SETVOLUME Get or Set the volume of Winamp.

I am having trouble understanding how to use sendmessage though, can anyone please off me some help?

The syntax of the sendmessage module I'm using is: !SendMessage "Window Class" "Window Title" "Message" "WPARAM" "LPARAM" "RETURN_VALUE_EVAR"

I tried: !SendMessage "{DA7CD0DE-1602-45e6-89A1-C2CA151E008E}/1" "" "IPC_JUMPTOTIME" "30" which didn't work. Am I even close? (the long number is the window class of foobar) I looked in the Winamp SDK and found:  #define IPC_JUMPTOTIME 106, and tried the decimal value 106, which didn't work.


Thanks for any help offered.

 

Foobar2k through command-line or sendmessage: jumptoposition x

Reply #2
The syntax of the sendmessage module I'm using is: !SendMessage "Window Class" "Window Title" "Message" "WPARAM" "LPARAM" "RETURN_VALUE_EVAR"

I tried: !SendMessage "{DA7CD0DE-1602-45e6-89A1-C2CA151E008E}/1" "" "IPC_JUMPTOTIME" "30" which didn't work. Am I even close? (the long number is the window class of foobar) I looked in the Winamp SDK and found:  #define IPC_JUMPTOTIME 106, and tried the decimal value 106, which didn't work.


According to Winamp SDK, it use this format
Code: [Select]
result = SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*);


So i think you should try
Code: [Select]
!SendMessage "Winamp v1.x" "" "WM_WA_IPC" "30" "IPC_JUMPTOTIME"


Hope this could solve you problem.