you can in wsh by using a timer
quick way without testing but the goal is to explain you the trick, after, adapt it
// global variable declaration for the timer
var refresh_timer = false;
function on_playback_new_track() {
// on new track, kill the current timer if running (=true), then set a new one with function to execute on each delay reached, below, refresh is set every 250 ms
if(refresh_timer) {
window.ClearInterval(refresh_timer);
refresh_timer = false;
}
refresh_timer = window.SetInterval(function() {
window.Repaint(); // bigger is your panel, more %cpu a repaint will consume, think about window.RepaintRect(x,y,w,h) instead of a Whole Repaint if you seekbar is only a small part of the panel
}, 250);
}
function on playback_stop() {
// kill the interval timer on playback stop
if(refresh_timer) {
window.ClearInterval(refresh_timer);
refresh_timer = false;
}
}
check samples that come with WSH Panel Mod component (in the zip), there are examples, and one for the timers too
HTH