Jump to content
Sign in to follow this  
tamir

get title

Recommended Posts

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

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

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

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

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

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...