Jump to content

clicking in deviantART commentbox


 Share

Recommended Posts

Hi people,

I wanted to know of it was possible clicking the commentbox at the bottom of deviantarts user profiles (http://rawox.deviantart.com) The box at the bottom is only visible when you're logged in.

I tried it with the FF.au3 file but I can't manage to select / click in the box...

Anyone has an answer?

Link to comment
Share on other sites

#include <IE.au3>
Global $oIE = _IECreate('http://rawox.deviantart.com')
Global $oForm = _IEFormGetObjByName($oIE, 'form-login')

Global $sUsername = 'username'
Global $sPassword = 'password'

If IsObj($oForm) Then
    Local $oObj = _IEFormElementGetObjByName($oForm, 'username')
    _IEFormElementSetValue($oObj, $sUsername)
    $oObj = _IEFormElementGetObjByName($oForm, 'password')
    _IEFormElementSetValue($oObj, $sPassword)
    _IEFormSubmit($oForm)
EndIf

Global $oEmoticons = 0
Global $oTextarea = _IEGetObjById($oIE, 'commentbody')
Global $oDivs = _IETagNameGetCollection($oIE, 'div')



For $oDiv in $oDivs
    If StringInStr($oDiv.className, 'pagescroll') Then
        ConsoleWrite($oDiv.className & @LF & $oDiv.innerHTML & @CRLF)
        $oEmoticons = $oDiv
    EndIf
Next

$oTextarea.scrollIntoView
_IEFormElementSetValue($oTextarea, 'Hello from AutoIt!')
If IsObj($oEmoticons) Then _IELinkClickByText($oEmoticons, ' Love')

Link to comment
Share on other sites

What the script already does is to log-in if necessary, scroll the page to the textarea element, fill the textarea with a simple string, click the 'Love' emoticon or how that is called and the rest can be done by you, submitting the message. Again, using DebugBar you can inspect the submitting button and click it using _IEAction with a reference to this element.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...