tamir Posted January 25, 2005 Share Posted January 25, 2005 if i use Run() to run a program and i insert it into a var ( $var = Run("*.exe") ) i get a number in $var - what is that number? and can i get the title or the "handle" of a program i opened with Run(), even if it's not on top anymore, so i can send keys and stuff? Link to comment Share on other sites More sharing options...
falconv Posted January 25, 2005 Share Posted January 25, 2005 The number you get is the PID (process ID). Since Run can be used to execute files that might not have a window (processes that run in the background), I don't think there's a ProcessGetTitle function. Unless the title changes each time, why not just execute the file, and use Window Spy to get the window's title? (or various other functions, such as WinGetTitle) Link to comment Share on other sites More sharing options...
tamir Posted January 25, 2005 Author Share Posted January 25, 2005 because i need the script to run and send key automatically for different programs with changeable titles (the program must do it all by itself). Link to comment Share on other sites More sharing options...
falconv Posted January 25, 2005 Share Posted January 25, 2005 do these executables open the window and make it active? If so, then you can use AutoItSetOption("WinTitleMatchMode", 4) Run( "file.exe" ) Sleep( n ); replace 'n' with how long it could possibly take to load and become active. $var = WinGetHandle( "active" ) Sorry if that's not helpful, but it's the best I can do with the info you're giving me. Let me know if it helps. Link to comment Share on other sites More sharing options...
tamir Posted January 26, 2005 Author Share Posted January 26, 2005 i used something similliar - WinGetTitle(""). thanks Link to comment Share on other sites More sharing options...
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