Akshay07 Posted February 17, 2010 Share Posted February 17, 2010 Hello all, I am facing a problem with the use of WinActivate/WinWaitActive. Both functions use the title and/or text to identify the window that should be used. My problem is that I could end up by having several existing windows with exactly the same title (text unknown). I am talking about a Command Prompt window. This is not due to the way the script is made (the script will use only one instance of Command Prompt), I am just trying to consider the use case in which the user would open "manually" another Command Prompt while the script is running. The script can of course know which PID is associated to the Command Prompt it should use, but I couldn't figure out a way to use the PID to identify a specific window that can be used with WinActivate/WinActive function. One solution I though of was to disable the possibility of starting the same program manually while the script is running but: 1/ I have no idea how to do that 2/ I would prefer to use a solution that does not give any limitation to the user Any direction to where to look at would be very welcome! Thanks. Link to comment Share on other sites More sharing options...
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 account
Already have an account? Sign in here.Sign In Now