Jump to content

Window Info with user input?

Recommended Posts

Good afternoon, everyone!

Been lurking around the forums searching the past couple of days, but couldn't find anything that I particularly have in my mind, so decided to create an account and ask.

Basically, I have created a script/automation process for something, but currently it works for everything and anything at hard-coded top, bottom, x, y boundaries of my screen. The script right now takes color1 of a pixel on mouse position then color2 of another at another position and runs a for loop to a user inputted number of times, clicking at color1 position. After it ran it the number, it clicks color2 and then basically waits for either me to terminate the script or input a number for the loop to run again n times at color1 and once at color2 at the end again.

My two main questions are:
1. Is it possible to somewhere in the script incorporate some code that you would get a prompt asking to input a window name/title and for the loop to work only in that window's borders?

2. Would it also be possible to make the mouse clicks happen there without interfering with the actual mouse that I need to use while the script is running? 

Help and examples are needed and highly appreciated! Can also include the code I'm running if needed.

Thanks in advance

Share this post

Link to post
Share on other sites

Yes providing the code would greatly help.  Can you tell us what is the application you are trying to automate ?  PixelSearch and MouseClick are really the worst way to interact with a Windows Apps.

Use this tool, when posting code.  Thanks.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...