Search the Community
Showing results for tags '_IEFormGetObjByName'.
-
_IEFormGetObjByName, cannot find $sName
kevin42036 posted a topic in AutoIt General Help and Support
Hi All, I am very new to AutoIt and scripting in general and have a question about IEFormGetObjByName. The help function says: _IEFormGetObjByName ( ByRef $oObject, $sName [, $iIndex = 0] ) But how do I find what to enter for $sName? In the example below, it says that it can be found by viewing the HTML source. So I went to the google home page, clicked Ctrl U to view the source, and cant figure out how they determined that the $sName is 'gbqf'. Can someone explain this process to me? Thanks in advance! ; Get a reference to a specific form by name. In this case, submit a query ; to the Google search engine. Note that the names of the form and form ; elements can be found by viewing the page HTML source #include <IE.au3> Local $oIE = _IECreate("http://www.google.com") Local $oForm = _IEFormGetObjByName($oIE, "gbqf") Local $oQuery = _IEFormElementGetObjByName($oForm, "q") _IEFormElementSetValue($oQuery, "AutoIt IE.au3") _IEFormSubmit($oForm) -
Hi I am trying to submit an IE Form: <FORM encType=multipart/form-data method=post name=menuForm action=/nac-cp/default.html><TABLE> <TBODY> <TR> <TD>Inspect:</TD> <TD><INPUT onkeydown="if (event.keyCode == 13) {do_menu_form_submit('quickSearch_searchFieldId_');return false;};" title="<accessNode>:<rackId>-<shelfId>-<slotId>-[iMA#/BOND#]<portId> / <label> / <Id> / LABEL=<portlabel> / LBL=<portlabel> / CLABEL=<customerlabel> / CLBL=<customerlabel> / INSP=<Id> / INSPECTION=<Id>" value="BM0LCPLB:1-1-6-36 " type=text name=quickSearch_searchFieldId_> <INPUT type=hidden name=EventSource> <INPUT type=hidden name=stack> <INPUT type=hidden name=currentPosition> <INPUT value=81BF3F3055F23467DA83BE94A943C651.nwanalyser-nac-cp-jboss-slave-1 type=hidden name=JSESSIONID> </TD></TR></TBODY></TABLE></FORM> The blow code does not work for me. There is no button for this form. From what I understand "onkeydown="if (event.keyCode == 13)" is the enter button. Does anyone know how I could gracefully send 'enter' to this without Winactivate or some such? $na = _IEAttach("myurl.html", "url") Local $oForm = _IEFormGetObjByName($na, "menuForm") Local $oText = _IEFormElementGetObjByName($oForm, "quickSearch_searchFieldId_") _IEFormElementSetValue($oText, "Somedata") _IEAction($oForm, "$oForm")
- 7 replies
-
- _IEAction
- _IEFormGetObjByName
-
(and 2 more)
Tagged with: