Jump to content
Sign in to follow this  
Guest delebre

Input Field Selection

Recommended Posts

Guest delebre

Hi guys, I love AutoIt.. and I am excited to be playing with it.. but there is something I can't seem to figure out.

My company has us do some very redundant data entry stuff, that I could slipstream with AutoIt... and free up time to do the important stuff.

We use a web based interface for our database, and we have Input Fields that are placed in different locations depending on how much input was entered by a previous person. Obviously using Mouse Move and clicking the box and pasting data won't work.

Here is my question..

Posted Image

How do I get AutoIt to get me to the first field? I can't use the mouse to click it, since it is dynamic. :)

Edited by delebre

Share this post


Link to post
Share on other sites
automagician

Can you see the objects in the window spy? If so, you could use the control functions.

Share this post


Link to post
Share on other sites
Guest delebre

No, they don't show up as anything.

Share this post


Link to post
Share on other sites
automagician

Can you tab through the app? I know it's a pain, but it may be your only choice. Unless any of the higher more experienced powers :) have any better ideas....?

Share this post


Link to post
Share on other sites
Ejoc

Is it possible to give an example of how it looks different?

Shipping Service Type: * [iNPUT FIELD]

vs

Shipping Service Type: 3rd Rate Donkey Mail [iNPUT FIELD]

If thats where its dynamic you could start from some point on the row and step to the right checking the pixel color until its white, then you know where the input field is. Then you have your x,y for a MouseClick.

*Edit* I would suggest this as a last resort if automagician's suggestion doesnt work

*Edit* PixelSearch would be handy here

Edited by Ejoc

Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs

Share this post


Link to post
Share on other sites
John-Paul

Can you tab through the app? I know it's a pain, but it may be your only choice. Unless any of the higher more experienced powers  :)  have any better ideas....?

<{POST_SNAPBACK}>

I have a similar situation.

How can I get the Tab key to Tab to the next GUICtrlCreateInput() field.

I have declared 4 fields

CODE:

; Fields

GUISetFont(8.5, 400, 0, "Verdana")

$sServerName = GUICtrlCreateInput("Server Name", 160, 90, 135, 20, $ES_UPPERCASE)

GUICtrlSetTip(-1, "The server you wish to connect to.")

GUICtrlSetColor(-1, 0x4B0082)

$sDatabaseName = GUICtrlCreateInput("Database Name", 160, 120, 135, 20)

GUICtrlSetTip(-1, "The database to create/delete.")

GUICtrlSetColor(-1, 0x4B0082)

$sUserID = GUICtrlCreateInput("Admin ID", 160, 150, 135, 20)

GUICtrlSetTip(-1, "Logon to SQL server as DBA.")

GUICtrlSetColor(-1, 0x4B0082)

$sPasswordID = GUICtrlCreateInput("Admin Password", 160, 180, 135, 20)

GUICtrlSetTip(-1, "Password required to logon to SQL server.")

GUICtrlSetColor(-1, 0x4B0082)

The default goes to $sServerName

CODE

GUICtrlSetState($sServerName, $GUI_FOCUS + $GUI_DEFBUTTON)

So how to TAB from one field to the next?

jp

Share this post


Link to post
Share on other sites
DaleHohm

Regarding the original scenario (it is a browser-based application and the last reply is an AutoIt GUI)...

You can use the COM interface to IE to iterate through the form fields, check for their current values and then stop when you find an empty one. If this sounds like it will work based on the additional details of your application -- please provide more detail on your app, the form and how you can tell visually where to start and we can put together a somple.

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
quaizywabbit

I have a similar situation.

How can I get the Tab key to Tab to the next GUICtrlCreateInput() field.

I have declared 4 fields

CODE:

; Fields

GUISetFont(8.5, 400, 0, "Verdana")

$sServerName = GUICtrlCreateInput("Server Name", 160, 90, 135, 20, $ES_UPPERCASE)

GUICtrlSetTip(-1, "The server you wish to connect to.")

GUICtrlSetColor(-1, 0x4B0082)

$sDatabaseName = GUICtrlCreateInput("Database Name", 160, 120, 135, 20)

GUICtrlSetTip(-1, "The database to create/delete.")

GUICtrlSetColor(-1, 0x4B0082)

$sUserID = GUICtrlCreateInput("Admin ID", 160, 150, 135, 20)

GUICtrlSetTip(-1, "Logon to SQL server as DBA.")

GUICtrlSetColor(-1, 0x4B0082)

$sPasswordID = GUICtrlCreateInput("Admin Password", 160, 180, 135, 20)

GUICtrlSetTip(-1, "Password required to logon to SQL server.")

GUICtrlSetColor(-1, 0x4B0082)

The default goes to $sServerName

CODE

GUICtrlSetState($sServerName, $GUI_FOCUS + $GUI_DEFBUTTON)

So how to TAB from one field to the next?

jp

<{POST_SNAPBACK}>

add $WS_TABSTOP into the style parameter of each....... Edited by quaizywabbit

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites
John-Paul

add  $WS_TABSTOP into the style parameter of each.......

<{POST_SNAPBACK}>

Tried that and still not working, any ideas?

CODE

$sDatabaseName = GUICtrlCreateInput("Database Name", 160, 120, 135, 20, $WS_TABSTOP)

etc....

jp

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  

×