Jump to content

Difference in text input types?


Recommended Posts

Hey guys,

So my assumption has been that ControlSend or ControlSetText is a more reliable way of automatically entering text because it interacts directly with the control, whereas Send just simulates keystrokes in a window. I am concerned about system choppiness being a problem.

So a few general questions:

1: Is simulating keystrokes more reliable than simulating clicks?

2: Is ControlSend more reliable than Send?

3: What is the difference between sending keystrokes to the window with Send and sending them straight to the control with ControlSend? In the LogMeIn installer if I use ControlSend for the username and password boxes, it will not accept the information. If I use Send to enter the text, it accepts it fine.

Looked around for answers but I wasn't able to track anything down. Any help is much appreciated.

Thanks

zepp

Link to comment
Share on other sites

A couple thinks to always remember:

Send - sends only to ACTIVE control/window - so, if the desired control/window is not active/selected/have FOCUS the Send command will fail.

ControlSend - when you have the ControlID it will send directly to that control no matter if it has the focus or not (if you try to send to an "empty control" - ControlID = "" the command will sometimes work and sometimes fail)

If your choice is to use mouse clicks in order to give focus to a particular control - you must pay attention at specifying the coordinates which should be relative to application rather than desktop because the app window can be moved by users.

As for the best way to do something - I'm affraid it is always a matter of trial & error ... try and see what it works the best in your case.

Good luck.

The AutoIt help is your best friend :)

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...