Yes, well I think we are talking about a whole different animal now, as much as they would share similarities.
It's not a matter of me making a version of your script/udf, as it will serve a different purpose.
I don't see a scenario for minimize or show, hide, etc. I just see it as -
1) Report to user that the program is already running, and maybe give an option to run another instance or not.
2) Don't report to the user, and don't allow another instance.
3) Don't report to the user, and allow another instance (possibly with determining criteria).
4) Don't report to the user, don't allow another instance, and restore the first instance to prominence.
That's pretty much it as i see it. 4 flags if you like.
The difficulties I envisage, and where perhaps our main difference lies, is where each program needs a unique marker automatically ... md5 hash perhaps?