Jump to content

Input Field Selection


Guest delebre
 Share

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

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

  • 3 months later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
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...