Jump to content

Recommended Posts

Hi!

I'm huuuge autoit fan. I really like it and it helped me many times. It's just amazing what you can do with it and every day I leard new things about it. I started with simple programs, than I made few bots and recently I discovered the IE functions. I decided to make a youtube comment poster that post a given comment to given video but I don't know how to get the text box id. This is what I've written so far

#include <IE.au3> 
AutoItSetOption("WinTitleMatchMode", 2)
$oIE = _IECreate ("http://www.youtube.com/watch?v=i3_Z96lxyUo&feature=dir")
;this is just a random video
send("{PGDN}")
sleep(100)
_IELinkClickByText ($oIE, "Post a text comment")

now a text box appear but I don't know how to write in it. I tried with

$oForm = _IEGetObjByName ($oIE, "text/textarea/reply... and many other words here")
and
$oForm = _IEFormGetObjByName ($oIE, "text/textarea/reply... and many other words here")
and
$oQuery = _IEFormElementGetObjByName ($oForm, "text/textarea/reply... and many other words here")

but it doesn't work. Also I tried to simulate a mouse click in the box but sometimes the box is lower and it doesn't work. Give me a hint please.

10x

I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Link to post
Share on other sites

Just a random video...but here...

#include<IE.au3>
_IEErrorHandlerRegister()
_IELoadWaitTimeout(5000)
$oIE=_IECreate("http://www.youtube.com/watch?v=JjmeSwPig_8",0,1,1)
$oForm=_IEGetObjByName($oIE,"comment")
$oSubmit=_IEGetObjByName($oIE,"add_comment_button")
_IEFormElementSetValue($oForm,"Thanks")
_IEAction($oSubmit,"click")
_IEErrorHandlerDeRegister()
_IEQuit($oIE)
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...