--- In [email protected], "quantiworks" <quanticwo...@...> wrote:
>
> "Sheri" wrote:
>  
> > Untried, but it looks like you would make a button for each of the actions 
> > and the commands entries would be:
> > 
> > .scriptn...@foobar_default_control("caption")
> > and so forth.
> > 
> > Since @Foobar_.. is the only label in the script, commands like this would 
> > also work:
> > 
> > .scriptname("caption")
> > .scriptname("stop")
> > .etc.
> 
> The command for caption works the same as mine:
> *Info expr(win.caption("c={E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}"))
> 
> The other commands though do not work, I wonder where did he got those WM 
> codes.
> Prior to finding this script, the only codes I have seen with Winspector, is 
> WM_APPCOMMAND and foobar must have the MM keys option set up.
> I also haven't found nothing through google indicating WM_COMMAND foobar 
> codes, so this is making me curious.
> I know there is a foo_remote.dll plugin that some people used and from what I 
> can remember it did allow WM_COMMAND codes, maybe he's using that or some 
> other plugin to interact it...
>


nahjegonn worte that he used Girder v3.2.9 (the last freeware version) without 
foo_ui_columns.dll plugin.

with foobar2000 v0.9.6.8, the following script is woking fine for me.

; ------------------------------------------------------
Local hWnd = Win.Handle("C={97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}")
Local hToolbar = Win.ChildHandleList(hWnd, "C=ToolbarWindow32").Word(1)
;; Local hToolBar = Win.ChildHandleList(hWnd, 
"C={FA3C10FD-A629-4e97-8731-EF51338807FD}").Word(1)

Local WM_COMMAND  = 0x111
Local mWP = Map.Create(6)
mWP["Stop"] = 1
mWP["Play"] = 2
mWP["Pause"] = 3
mWP["Previous"] = 4
mWP["Next"] = 5
mWP["Random"] = 6

Local sParam = "Previous" ;; for "previous" track
Win.PostMessage(hToolbar, WM_COMMAND, mWP[sParam], 0)
; ------------------------------------------------------

Reply via email to