--- In [email protected], "quantiworks" <quanticwo...@...> wrote:
>
> Hi forxtra,
> 
> thanks for clarifying what nahjegonn used and for sharing your script.
> 
> I use foo_ui_columns.dll, so that's one reason it wasn't working...
> 
> How do I use your script? (I have map plugin and even though I use foobar 
> same version: 0.9.6.8, I had to change c=)
> So, it's:
> .scriptname +?
> 
> 
>

The preivous script is also not considering to using a foo_ui_columns.dll 
plugin since I installed foobar2000 yesterday.

with the foo_ui_columns.dll plugin, the following script is working for me. the 
classname to find out foobar2000 is identical with your code.


ControlFoobar("Previous")
ControlFoobar("Random")

; -------------------------------------------------
Function ControlFoobar(sParam)
        ;; with foo_ui_columns.dll
        Local hWnd = Win.Handle("C={E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}")
        Local hToolbar = Win.ChildHandleList(hWnd, "C=ToolbarWindow32").Word(1)
;;      Local hToolBar = Win.ChildHandleList(hWnd, 
"C={D75D4E2D-603B-4699-9C49-64DDFFE56A16}")

        If (!hToolBar) Do
                Quit
        EndIf

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

        mWP["Open"] = 7

        Win.PostMessage(hToolbar, WM_COMMAND, mWP[sParam], 0x20614)
Quit
; -------------------------------------------------



> Also, can you explain me this command:
> 
> Local hToolbar = Win.ChildHandleList(hWnd, "C=ToolbarWindow32").Word(1)
> 
> Are you telling PowerPro to assign a var to foobar menu buttons toolbar in 
> order to use them in the script?
> And what's that .Word(1) for?
>

It is the simple way to fine child control handle of <cl>.
win.childhandlelist(<cl>, "c=classname") returns blank separate list of child 
window handles for main window matching <cl>.

foobar2000 with foo_ui_columns.dll plugin has two ToolbarWindow32 classes. so, 
it's need to separate by given n (in this case, the first handle).



Reply via email to