MrPook 0 Posted September 21, 2007 Hello, i'm using a tool which is very tricky. In fact, it creates it's own webpages so some boxes to fill will have allways the same id, but a different name each time (with rand number inside) which is difficult to me ... <INPUT id=fakeName name=##0!3!simpleSearch!1247629!*!$1!1!"> I tried this code $oDiv = _IEGetObjById ($oIE, "fakeName") _IEFormElementSetValue ($oDiv, "hi_there") but it wont work, i dont know how to solve it ... (in fact i used to work with fixed names and forms : $oForm = _IEFormGetObjByName ($oIE, $form) $oText = _IEFormElementGetObjByName ($oForm, $var_name) _IEFormElementSetValue ($oText, $value) but i dont have forms now) Thanks in advance Mr Pook Share this post Link to post Share on other sites
DaleHohm 65 Posted September 21, 2007 Is it an INPUT element or a DIV? If it is a DIV you can use _IEPropertySet($oDIV, "innertext", new-string) If it is an INPUT element, it is important to know what the TYPE= value is 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
MrPook 0 Posted September 22, 2007 (edited) Is it an INPUT element or a DIV? If it is a DIV you can use _IEPropertySet($oDIV, "innertext", new-string)If it is an INPUT element, it is important to know what the TYPE= value isDalethe element seems to be a INPUT only : i just make some simplifications in the code generated and here it is :<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Rechercher</title><tr><td class="lr1">Nom:</td><td class="lr2"><INPUT id = "fakeName" TYPE="text" NAME="##0!3!com.enterprise.search:simpleFrame.simpleSearch!1595423!property.fakeName" VALUE=""></td><td class="lr1">Numéro:</td><td class="lr2"><INPUT id = "fakeNumber" TYPE="text" NAME="##0!3!com.enterprise.search:simpleFrame.simpleSearch!property.fakeNumber" VALUE=""></td></tr></body></html>as you can see, ids are pretty simple, but NAMES aren't at all (and i cut most part of them)thanx in advance for your help Edited September 22, 2007 by MrPook Share this post Link to post Share on other sites
DaleHohm 65 Posted September 23, 2007 With this HTML, the code in your basenote should work... unless there are other elements on the page that also have an id="fakeName". If this is the case, the DOM will be confused because it requires that ID's are unique. You can still work around that by using _IETagNameGetCollection($oIE, "input", 0-based-index). 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