Jump to content
Sign in to follow this  

Send text to TEXTAREA.

Recommended Posts



I am trying to place a text of my choice in a textarea. I have now tried everything as it is said in the help file but it doesn't work. I have also tried a lot of variations of what the help file sais but my knowlodge is not big enough yet to be succesful at it. The piece of html that I believe to be relevant:

<SPAN id=bidding_dep><BR><INPUT id=ab tabIndex=180 type=checkbox CHECKED value=1 name=allow_bid _extended="true"> <LABEL class=hand for=ab>Biedingen op uw advertentie toestaan</LABEL> <INPUT type=hidden value=1 name=bidding> </SPAN><BR><BR></TD></TR></TBODY></TABLE>
<DIV id=t11><B>Website</B></DIV><IMG src="http://statisch.marktplaats.nl/images/TIP_diensten_27x14.gif"> Nu in prijs verlaagd: een link naar uw website <INPUT id=11 onblur="txtonblurUrl(this, 'http://statisch.marktplaats.nl/images/txtwebsite_3euro.gif');" style="BACKGROUND-IMAGE: url(http://statisch.marktplaats.nl/images/txtwebsite_3euro.gif); WIDTH: 100%; BACKGROUND-REPEAT: no-repeat; backgroundPositon: left center" onfocus=txtonfocusUrl(this); tabIndex=190 maxLength=255 name=url><BR><BR>
<DIV id=tdescription_border><B>Advertentietekst * </B></DIV>
<DIV id=description_border style="WIDTH: 100%">
<DIV class=widgContainer id=descriptionWidgContainer style="VISIBILITY: visible">
<UL class=widgToolbar id=descriptionWidgToolbar>
<LI class=widgEditButton id=descriptionWidgToolbarboldmp><A class=widgButtonBold title=Bold href="#" action="bold">Bold</A></LI>
<LI class=widgEditButton id=descriptionWidgToolbaritalicmp><A class=widgButtonItalic title=Italic href="#" action="italic">Italic</A></LI>
<LI class=widgEditButton id=descriptionWidgToolbarunderlinemp><A class=widgButtonUnderline title=Underline href="#" action="underline">Underline</A></LI>
<LI class=widgEditButton id=descriptionWidgToolbarunorderedlistmp><A class=widgButtonUnordered title="Unordered List" href="#" action="insertunorderedlist">Unordered List</A></LI>
<LI class=widgEditButton id=descriptionWidgToolbarundomp><A class=widgButtonUndo title=Undo href="#" action="undo">Undo</A></LI>
<LI class=widgEditButton id=descriptionWidgToolbarredomp><A class=widgButtonRedo title=Redo href="#" action="redo">Redo</A></LI>
<LI class=widgEditButton id=descriptionWidgToolbarhelpmp><A class=widgButtonhelp title=Help href="#" action="help">Help</A></LI></UL><IFRAME class=widgIframe id=descriptionWidgIframe tabIndex=215 frameBorder=no></IFRAME><INPUT id=description type=hidden><INPUT id=descriptionWidgEditor type=hidden value=true></DIV><TEXTAREA class="widgEditor nothing" id=description style="DISPLAY: none; VISIBILITY: visible; WIDTH: 99.5%" tabIndex=215 name=description rows=15 cols=30 _extended="true"></TEXTAREA> </DIV><INPUT id=description_tmp type=hidden name=description_tmp>
<script language=Javascript type=text/javascript>

                        var el11 = document.getElementById('11');

                        if (el11) {
                            txtonblurUrl(el11 , 'http://statisch.marktplaats.nl/images/txtwebsite_3euro.gif');


If you want to see the page for yourself you can go to the site here: http://verkopen.marktplaats.nl/select_category.php. You will then have to click on random options in the dropdown menu's and click "verder". The form that you will see then is the one I am trying to fill out. I want to make a script that manages my advertisements on this ebay like website.

One of the scripts I tried myself is this one:

$bigger = _IEFrameGetObjByName($oIE, "body")
$oForm = _IEFormGetCollection($bigger, 0)
$oBtextarea = _IEFormElementGetCollection($oForm, 35)
_IEFormElementSetValue ($oBtn2, $ad1advertentie)

I have tried every number from 32 to 35 just in case becuase I didn't know which one to target exactly. I have also tried many variations of the following:

$bigger = _IEFrameGetObjByName($oIE, "body")
$form = _IEGetObjByName($bigger, "ad_form")
$descriptionbar = _IEGetObjByName($form,"description",0)
_IEFormElementSetValue ($descriptionbar, $ad1advertentie)

None of it seems to work. I can offcourse use tab's or give a mouseclick in the textarea and use send but I want something a little more intelligent and perhaps more important, that doesn't require my mouse and keyboard so it can run in the background.

Can any of you help me out? It is much apriciated.


Share this post

Link to post
Share on other sites

Look up ControlSend. This should let you send it text in the background


Share this post

Link to post
Share on other sites

The only TEXTAREA in the HTML you posted has an ID of "description". Suggest you replace

$oBtextarea = _IEFormElementGetCollection($oForm, 35)


$oBtextarea = _IEGetObjById($bigger, "description")

You'll also then get a NOMATCH error if it is not where you think it is.


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

So now I tried the following scripts:

$bigger = _IEFrameGetObjByName($oIE, "body")

$oForm = _IEFormGetCollection($bigger, 0)

$textarea = _IEGetObjById($bigger, "description")

_IEFormElementSetValue ($textarea, $ad1advertentie)


$bigger = _IEFrameGetObjByName($oIE, "body")

$oForm = _IEFormGetCollection($bigger, 0)

$textarea = _IEGetObjById($oForm, "description")

_IEFormElementSetValue ($textarea, $ad1advertentie)

Without succes. Or should I forget all about _IEFormElementSetValue becuase that is the problem? Should I in that case use:



But can I use controlsend to target an IE object? Becuase then I would not know exactly where to fill out what in this:

ControlSend ( "title", "text", controlID, "string" [, flag] )

Or I wouldn't know about the first 3 anyway. And I also dont like the clipput becuase then I still cant run it 100% in the background becuase it still needs my clipboard. Is there an alternative?

Thanks for your help,


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