tamir 0 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? Share this post Link to post Share on other sites
falconv 0 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) Share this post Link to post Share on other sites
tamir 0 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). Share this post Link to post Share on other sites
falconv 0 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. Share this post Link to post Share on other sites
tamir 0 Posted January 26, 2005 i used something similliar - WinGetTitle(""). thanks Share this post Link to post Share on other sites