Search the Community
Showing results for tags 'textarea'.
-
Greetings! I have been trying to get send to this textarea on a website a message through ControlSend because _IEFormElementSetValue doesnt work on it, so i get the hwnd of the IE window then do the ControlSend to the window, and the message it sends doesnt type some of the letters. The textarea <textarea style="overflow:hidden;height:undefinedpx;" class="form-control input-sm" placeholder="Add a comment" rows="1" data-reactid=".0.3.2.1.2.0.$view.8.1.0.0.1"></textarea> How im getting the textarea: $comment_area = _IETagNameGetCollection($oIE,"textarea") for $element in $comment_area if $element.placeholder = "Add a comment" Then _IEAction($element,"focus") Sleep(1500) ;_IEFormElementSetValue($element,$comment_list[$random_index]) ;_IEFormSubmit($element) ControlSend($hIE,"","[CLASS:Internet Explorer_Server; INSTANCE:1]",$comment_list[$random_index],1) ;Send("{ENTER}") Sleep(3000) ;Hacer que sea random EndIf Next When i use _IEFormElementSetValue it changes the text on the box, but it doesn't change the value or something because when i send an Enter key it doesn't submit the message (I Also tried _IEFormSubmit) With ControlSend it does send it but corrupted, for example: Message: Pretty nice Result: ety nice Also i know the element is the actual one im referring because if i use _IEAction($element,"focus") it focuses the one i want. Any help appreciated!
- 2 replies
-
- controlsend
- autoit
-
(and 2 more)
Tagged with:
-
How can you scroll to the end of a text area in IE without using focus/ControlSend? I have tried several solutions (see code below) but I can't seem to get them to work. Test HTML (test.html) <!DOCTYPE html> <html> <body> <textarea id="textarea-test" rows="4" cols="50"> </textarea> </body> </html> AutoIt Test Code: #RequireAdmin #include <IE.au3> $oIE = _IECreate(@ScriptDir & "\test.html") Local $hWnd = _IEPropertyGet($oIE, "hwnd") Local $oTextarea = _IEGetObjById($oIE, "textarea-test") Local $sText = "" For $i = 1 To 30 $sText &= $i & " " _IEPropertySet($oTextarea, "innerhtml", $sText) ;NOT WORKING ;$oTextarea.document.parentwindow.scroll(0, 99999) ;_IEAction($oTextarea, "scrollintoview") ;NOT WORKING ;$iDocHeight = $oTextarea.document.body.scrollHeight() ;$oTextarea.document.parentwindow.scrollTo(0, $iDocHeight) ;NOT WORKING ;$oTextarea.document.parentwindow.scrollTo(0, 99999) ;NOT WORKING ;$oTextarea.scrollintoview() ;WORKING _IEAction($oTextarea, "focus") ControlSend($hWnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "^{end}") Sleep(100) Next
- 2 replies
-
- internet explorer
- ie
-
(and 2 more)
Tagged with:
-
I'm having a hard time trying to set a value in a specific JavaScript textarea... And I think, this is the right time.. Is it possible to set a value in the "Join the discussion…" textarea and simulate the mouse click of the "Post as {USERNAME}" button of the web page that have added a Disqus forum? If they are possible then: How can I set a value in the "Join the discussion…" textarea? And how to simulate the mouse click of the "Post as {USERNAME}" button? Note: Before you can see the "Post as {USERNAME}" button, you must be sign in with Disqus first! This is the (NULL) previous test work that I've done: #include <IE.au3> $oIE = _IECreate("http://professionalserver.tk/php/wp/hello-world/", 0, 1, 1, 0) Sleep(10000) $disqus_thread = $oIE.document.getElementById("disqus_thread") $textarea = $disqus_thread.getElementsByClassName("textarea").innerHTML = "Example Message" _IELinkClickByText($oIE, "Post as") Here is my test blog that have a Disqus thread: http://professionalserver.tk/php/wp/hello-world/ Here is the other web page that have it: http://www.voicesofyouth.org/es/posts/oneminutesjr---syria-my-love- Here is the other one: http://comercioexterior.gob.ec/min-rivadeneira-participo-en-evento-experience-ecuador-love-life-en-dubai/ And also make sure that the script will also work in any page that have a Disqus thread..