muhmuuh Posted August 28, 2007 Posted August 28, 2007 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.
muhmuuh Posted August 28, 2007 Author Posted August 28, 2007 ideas? I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.
Generator Posted August 28, 2007 Posted August 28, 2007 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)
muhmuuh Posted August 28, 2007 Author Posted August 28, 2007 thank you very much so my mistake is that I didn't use "comment" in _IEGetObjByName() ? again thank you I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.
Generator Posted August 28, 2007 Posted August 28, 2007 thank you very muchso my mistake is that I didn't use "comment" in _IEGetObjByName() ?again thank youYou didn't even get the correct objname, read the source would help.
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