Jump to content

Recommended Posts

Posted

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?

Posted

#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')

Posted

Well, this is login in to deviantART, but it doesn't click the commentbox I think...

It also needs to type in something like "thankyou for the :+fav:"...

Posted

Use DebugBar to inspect the item's name or id to retrieve a reference to it. Once you have it you can click it using _IEAction() in conjunction with 'click' string. Why do you need to click it?

Posted

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.

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
×
×
  • Create New...