Jump to content
Sign in to follow this  
majorstr20

How do I select the window I want the script to run in?

Recommended Posts

majorstr20

I have a basic script that can basically run in any window. How do I tell the autoit script which window to run the script for?

Share this post


Link to post
Share on other sites
dani

Some more explanation is needed. What do you mean by 'the window to run the script for'? Autoit can create its on GUI or interact with existing windows but I don't really understand what you want to do.

Share this post


Link to post
Share on other sites
majorstr20

Let's say I have multiple copies of notepad.exe up. There are 2 notepad files up, the titles are: notepad1.txt and notepad2.txt. I only want to perform autoit functions to notepad1.txt.

Edited by majorstr20

Share this post


Link to post
Share on other sites
Jos

What is the exact title for the window for which you want to perform functions?

When you have the answer: What functions do you want to perform for that Window?

Some AutoIt3 function have to option to tell what window to use or else ypu need to make it the active window first in case of Send() for example.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
dani

Be sure to read the documentation about Window Titles, you can use these in ControlSend() commands as title parameter.

In the example on the ControlSend() doc page "[CLASS:Notepad]" is used as title parameter, but you have many more options.

Edited by d4ni

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  

×