Rymwa 0 Posted December 23, 2020 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
Nine 993 Posted December 23, 2020 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. Not much of a signature but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Multi-keyboards HotKeySet Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites