Rawox Posted August 5, 2009 Posted August 5, 2009 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?
Authenticity Posted August 5, 2009 Posted August 5, 2009 #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')
Rawox Posted August 5, 2009 Author Posted August 5, 2009 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:"...
Authenticity Posted August 5, 2009 Posted August 5, 2009 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?
Rawox Posted August 5, 2009 Author Posted August 5, 2009 Well i don't need to click, it just needs to type in something
Authenticity Posted August 5, 2009 Posted August 5, 2009 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now