tokai6 0 Posted August 1, 2010 I've been using Autoit for sometime now... and now I am faced with this problem... How do I get the name of textbox in the Internet Explorer... I tried looking at the source of the page... the name is static(it changes everytime I load the page) and an ID seems to be missing or theres no ID at all <input name="user_89f7bf6f731c3a9cbc4418b63689f949" type="text" size="17" class="field_login"> thats the source... the alphanumeric after the "user_" is the one that changes... Share this post Link to post Share on other sites
saywell 3 Posted August 1, 2010 I've found debugbar - http://www.debugbar.com/ - good for this type of thing. William Share this post Link to post Share on other sites
tokai6 0 Posted August 1, 2010 I've found debugbar - http://www.debugbar.com/ - good for this type of thing.Williamthanks for replying...but i used it the problem is still there... the name changes everytime I reload the page... Share this post Link to post Share on other sites
saywell 3 Posted August 1, 2010 thanks for replying...but i used it the problem is still there... the name changes everytime I reload the page...Could you use a wildcard or RegEx to find the other bits that remain static?<input name="user_*" type="text" size="17" class="field_login"> Is this a public website?William Share this post Link to post Share on other sites
tokai6 0 Posted August 1, 2010 Could you use a wildcard or RegEx to find the other bits that remain static?<input name="user_*" type="text" size="17" class="field_login"> Is this a public website?WilliamI tried it...$oIE = _IECreate("*******.com")$o_form = _IEFormGetObjByName($oIE, 0)$o_TBox = _IEFormGetObjByName($o_form,"user_*")_IEFormElementSetValue($o_TBox,"USERNAME")it results to...--> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataTypeYes its a public website... I just want to do a automatic login for it... Share this post Link to post Share on other sites
saywell 3 Posted August 1, 2010 I tried it...$oIE = _IECreate("*******.com")$o_form = _IEFormGetObjByName($oIE, 0)$o_TBox = _IEFormGetObjByName($o_form,"user_*")_IEFormElementSetValue($o_TBox,"USERNAME")it results to...--> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataTypeYes its a public website... I just want to do a automatic login for it...How about _IETagNameGetCollection and then identify the right one in your script?What is the url?William Share this post Link to post Share on other sites
tokai6 0 Posted August 1, 2010 (edited) How about _IETagNameGetCollection and then identify the right one in your script?What is the url?WilliamI tried the _IETagNameGetCollection but there are too much output for me handle...Thanks anyways for the info on _IETagNameGetCollection im using it now... until i find a better code ill use this one for now... Edited August 4, 2010 by tokai6 Share this post Link to post Share on other sites
DaleHohm 65 Posted August 2, 2010 $oInputs = _IETagnameGetCollection($oIE, "input") For $oInput in $oInputs If String($oInput.className) = "field_login" Then $sName = $oInput.name ConsoleWrite($sName & @CRLF) EndIf Next Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe 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
tokai6 0 Posted August 2, 2010 $oInputs = _IETagnameGetCollection($oIE, "input") For $oInput in $oInputs If String($oInput.className) = "field_login" Then $sName = $oInput.name ConsoleWrite($sName & @CRLF) EndIf Next Dale Thanks Mam/Sir this will do nicely... Problem solved... Share this post Link to post Share on other sites