Just throwing this out there, I dunno how this works, but maybe try opening a new thread via your dll and calling the proper user32 and kernel hooks to force the window to keep updating like the script is in the topic. I honestly couldn't figure it out regardless, because in order to call the dll, the window would need to be active to begin with.
Also.... I forgot I still exist there. I still have the fucking Decisive Media shit as my avvie/siggie