Sign in to follow this  
Followers 0
Rawox

clicking in deviantART commentbox

6 posts in this topic

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?

Share this post


Link to post
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')

Share this post


Link to post
Share on other sites

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:"...

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Well i don't need to click, it just needs to type in something

Share this post


Link to post
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.

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  
Followers 0