Sign in to follow this  
Followers 0
wooddy

Data Entry

8 posts in this topic

Does anyone know how to select an input box on a form then send it some keystrokes?

For example, a form contains three input box (First name, Last name, SSN). I would like to be able to place the cursor inside the input box for one of the above mentioned fields based on the input box name then send it keystrokes.

Share this post


Link to post
Share on other sites



Does anyone know how to select an input box on a form then send it some keystrokes?

For example, a form contains three input box (First name, Last name, SSN). I would like to be able to place the cursor inside the input box for one of the above mentioned fields based on the input box name then send it keystrokes.

ControlFocus() then you can use ControlSend() or Send()

Share this post


Link to post
Share on other sites

ControlFocus() then you can use ControlSend() or Send()

Thanks for your reply.

Share this post


Link to post
Share on other sites

ControlFocus() then you can use ControlSend() or Send()

How do you get the control ID on the form?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

How do you get the control ID on the form?

(AutoIt folder)\Au3Info.exe, select the window you want and the controlId would be Class & Instance, more infos about it here and here

Edited by Gif

Share this post


Link to post
Share on other sites

(AutoIt folder)\Au3Info.exe, select the window you want and the controlId would be Class & Instance, more infos about it here and here

Hi, I used the AU3Info utility to get the class and id of the control but I am still not able to interact with the control.

Attached are .bmp code AU3Info results.

Share this post


Link to post
Share on other sites

(AutoIt folder)\Au3Info.exe, select the window you want and the controlId would be Class & Instance, more infos about it here and here

My previous reply did not have the attachments. The upload exceeded the limit.

Here's my code:

Set IE = New InternetExplorer

Set AI = New AutoItX3

If AI.WinExists("Smith Bits S.T.A.T.S.") Then

AI.WinActivate ("Smith Bits S.T.A.T.S.")

AI.ControlFocus "Smith Bits S.T.A.T.S.", "", "[CLASS:ComboLbox; INSTANCE:1]"

AI.ControlCommand "Smith Bits S.T.A.T.S.", "", "[CLASS:ComboLbox; INSTANCE:1]", "ShowDropDown", ""

Else

IE.Navigate "http://www.smith.com/stats/new/index.asp"

IE.Visible = True

End If

Share this post


Link to post
Share on other sites

Is it controls HTML in IE you are trying to interact with or a native GUI?

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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