Sign in to follow this  
Followers 0
Dread

Help on minimised instances.

7 posts in this topic

Hi all, im a newbie to programming and autoit. Have found out that it serves in many areas to make work easier, have gone through some guides to programming in general and especially in autoit well enough to cover some basic aspects and continuing to learn many functions each day, as i sense it can help with my work.

First i'll explain what im targeting autoit to perform....A part of my work includes filling out payment vouchers(not browser based) for many employees with many common fields. If i had to do it individually entering those common fields with a general copy/paste, it would take long as it's like about 50 fields per form. So what im looking to do is open many instances like 20-30 of the form and load up individual entries and minimize them, having only one form in display.

I'll feed the minimised individual windows' handle(hwnd) into the main script before starting. Now.... when i click within a range of pixels(as i cant exactly click on the exact pixel) in the active window, i want to know if the controlclick() will click in a specified pixel and controlsend() in the same manner for all individual minimised windows, If its possible then how should i script to detect a click in a range of pixels. As i need this script to run forever until i terminate it with an esc, should i enclose the whole script inside a while...do loop.? Thanks in advance..

Share this post


Link to post
Share on other sites



Hi, welcome to the forum. Why would you not do this in something like Excel, or if that is not possible, why on earth are you talking pixels? You should be interacting with controls (fields, etc).


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

Its an individual software designed exclusively for this work, everything comes preloaded. I'm looking to do something a script like this...

if(click detected in a range of pixels) then

controlclick(form 1 in pixel x,y)......controlclick(form 30 in pixel x,y)..etc.

In the same manner, i'll use it to scroll the form(s) up and down.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Well, you would be clicking at specific Mouse positions then, but if you use the Window Info Tool that comes with AutoIt, you could check the names of the controls you want to work with, and perhaps address them directly, without all the issues associated with automating your mouse.

If you provide some basic code, we can see what's involved and how best to target our help.

Edited by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

Nice, that very well explains of the controls. A final question is..if i do a _isPressed code on the script, can it do a controlsend(of the _isPressed key) to all the instances.? Is autoit possible of doing it..? Ty.

Share this post


Link to post
Share on other sites

Not entirely sure what you mean by that, but you can use the Send command or ControlSend command to most likely achieve what you want. We can help further if you provide some code.

It may even be, that the software you want to automate, has already been automated by someone here, so any detail of name(s) etc could help.


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

You seem to be moving towards a keylogger.  Without answering questions regarding that, ControlSetText is much more reliable than the *Send functions.  It works in 95% of instances...except when the application is actually attempting to validate a user 'keyed' in text, which then you should use ControlSend, and validate that the send was fully populated with ControlGetText.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

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  
Followers 0