RunScript finished

Hi, I run a command to minimize the window with:
RhinoApp().RunScript(0, L"_Minimize")
and is ok, but now I need to get when the command is finished (the window minimized).
Is it possible?
Thanks
Ceruti