Posted by member 212670 on 2005-11-21 23:48:06 link

Well, the trick would be to capture some kind of "event" to fire a !bang if play or pause was pressed on winamp itself. None of the amp modules do that (someone correct me if I'm wrong).

If someone wanted to, it could actually be done with xlabel. First, you'd create a dummy label that only showed [winampStatus]. Then you'd set that label to fire a script bang with (labelname)OnTextChange. In the script, you'd first export the label's text with !LabelInfoExport, and set a variable with it. Then, using gotoif-s, you'd evalute the variable, and set the ampplaying var (as above) based on that. So, it would look something like this:

*Script bang !setampvar
*Script exec !LabelInfoExport (labelname) amptmp
*Script gotoif ( "%{amptmp}" = "Paused" ) paused
*Script gotoif ( "%{amptmp}" = "Playing" ) playing
*Script exit
*Script label paused
*Script exec !varset ampplaying 0
*Script exit
*Script label playing
*Script exec !varset ampplaying 1
*Script ~bang

Then, in theory (I haven't tested this :)), the original !playpause script would fire the right command, even if you controlled play/pause on winamp.

edit - And of course, you could add gotoif-s for all the [winampStatus] texts, not just play and pause.