no925 Posted November 12, 2006 Posted November 12, 2006 I want to run only one instance of a program. I will know the program name but not the title. I guess I need to use the ProcessExists statement but I don't know how to actvate the window. So the code would be along these lines. If ProcessExists("program.exe") Then ... Activate ... Else Run program.exe What statements do I need to get the title via a PID so I can use WinActivate? --- More Details The idea is that I have GUI (written by someone else in Java) It has user defineable link buttons that you can set for loading a URL or File All works well except that on the 2nd click of the button a new and duplicate program/webpage gets loaded. If it exists then I only want to activate the program/browser. My idea is to run it through an AutoIt called Load.exe Then instead of the link pointing directly to the program/url I would get it to link to Load.exe with a parameter. i.e. "load program.exe" or "load http://ww....." I intend to give this to the other programmer for distribution and therefore have no way of telling what the program will be and hence the window title. The browser bit I think I can manage but I need help finding the window title of the process. Any Ideas would be greatfully received! Regards Richard
Valuater Posted November 12, 2006 Posted November 12, 2006 (edited) without reading the "more details"..i think this little UDF by SmOke_N may do the trickhttp://www.autoitscript.com/forum/index.ph...st&p=254077its in Autoit Wrappershttp://www.autoitscript.com/forum/index.ph...st&p=1337698)EDIT: fixed first link Edited November 12, 2006 by Valuater
no925 Posted November 12, 2006 Author Posted November 12, 2006 Thank you Valuater. A small modification and that will do nicely! (Thanks also to SmOke_N for the code)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now