How to send virtual keypresses to Winamp AVS with SendMessage (windows)?

Hi, I’m trying to use SendMessage-(Windows) to send message to Winamp’s AVS visualisation window.

Attached are 2 methods I thought would work. The 1st tries to focus the window and then presses space (next preset shortcut key) as the example on the SendMessage docs. The second tries to to send space directly with WM_KEYDOWN. Neither works, and I’m not sure why. Can anyone explain?

I also looked at vux-modules-winamp but there doesn’t seem to be a message in Winamp API for visualisation control beyond starting/stoping the plugin and opening the config (what I want to do is switch presets).

2 ways that I thought would work. (3.7 kB)

set the focus first with SendMessage (Windows) then use Keyboard Input of Keyboard (System Global) to send the desired keystrokes to that window.
how we solved it for the KillBorder module.

The “AVS Send Space” module works for me, but I am using XMPlay for AVS because it runs in it’s own process window then and can be handled better with the ScreenShot node.

But actually it would be much more useful to have AVS load a specific file, i.e. simulate drag&drop of a file to the AVS window. Because usually I don’t want to play a random or just the next/prev preset.

AvsChangePreset.v4p (14.3 kB)

Okay that should be possible by remote-opening the open dialog, entering the filename “by hand” and “pressing” Open. Will look into this later…

Ah you’re right, it does work in XMPlay.
Thanks a lot for the hint, was driving me nuts.

Well then, I was only sending space as a test, when I found I couldn’t make it work I started stripping it down to the minimum: what I (and you too?) really want to do is have presents assigned to hotkeys f1-12, 1-0 etc (They’re assigned via ctrl+hotkey) and send it those hotkeys by the same method. Nice.

Well I have well over thousand presets - admitted, I wouldn’t want to play half of them live - but still, some 30 presets is not really enough for me…
Still thinking about drag&drop simulation via WM_DROPFILES but I would have to create a) the dropfiles structure and b) create a pointer to that struct. But, eeeet, vvvv doesn’t have any pointers - perhaps shared memory?? - not likely.

I think I would have to write a plugin to achieve that. I am thankful for any pointers :)

Oh and do you make AVS presets yourself? You have some packs out or something?

Ok I had a look at WM_DROPFILES but I don’t understand how I’d do that in vvvv (so far).

I do make AVS presets but have nowhere near 1000 (…32 hotkey limit is not too bad for me tbh!) I don’t have a pack out yet, I only just got back into it.