canlimero Posted November 27, 2006 Share Posted November 27, 2006 Hi, I tries to login to the new Yahoo Webmail and click on Attach file but without success I think that they used a frame for their webmail but I'm a newbie and I cannot reach the Attach button. If someone has any idea ... Thanks Link to comment Share on other sites More sharing options...
NeoFoX Posted November 27, 2006 Share Posted November 27, 2006 http://www.autoitscript.com/forum/index.ph...amp;#entry91358Would help you with frames and buttons on it Neo [center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center] Link to comment Share on other sites More sharing options...
canlimero Posted November 27, 2006 Author Share Posted November 27, 2006 (edited) Thanks for your fast answer! I already read this. I attahced my source code. I try to Get this frame object: "attachmentDownloadFrame" and the _IETagNameGetCollection cannot find anything Actually maybe I don't understand the Yahoo source code expandcollapse popup#include <IE.au3> ; Create a browser window and navigate to Yahoo $sWebMail = "www.yahoomail.com" $sTextToFind_Compose = "Compose" $sSignOut = "Sign Out" $username = "xxxx" $password = "xxxx" $oIE = _IECreate ($sWebMail) _IELoadWait ($oIE) Opt("WinTitleMatchMode", 2) $title = WinGetTitle("Yahoo", "") WinSetState($title, "", @SW_MAXIMIZE) ; get pointers to the login form and username, password and signin fields $o_form = _IEFormGetObjByName ($oIE, "login_form") $o_login = _IEFormElementGetObjByName ($o_form, "login") $o_password = _IEFormElementGetObjByName ($o_form, "passwd") ; Login and Password ; Set field values and submit the form _IEFormElementSetValue ($o_login, $username) _IEFormElementSetValue ($o_password, $password) _IEFormSubmit ($o_form, 0) _IELoadWait ($oIE) ; Compose New Message Sleep(5000) Send("n") _IELoadWait ($oIE) $oFrame = _IEFrameGetObjByName($oIE, "attachmentDownloadFrame"); get a reference to the contents frame ;_IEClickLinkByText($oFrame, "Attach"); click on a link in the contents frame $sTextToFind_AttachFiles = "Attach" $oTDs = _IETagNameGetCollection($oFrame, "") MsgBox(4096, "Test", $oTDs, 10) For $oTD in $oTDs MsgBox(4096, "Test", $oTD.innerText, 10) If String($oTD.innerText) = $sTextToFind_AttachFiles Then _IEAction($oTD, "click") ExitLoop EndIf Next _IELoadWait ($oIE) Edited November 27, 2006 by canlimero Link to comment Share on other sites More sharing options...
mikehunt114 Posted November 27, 2006 Share Posted November 27, 2006 #include <IE.au3> ; Create a browser window and navigate to Yahoo $url = "www.yahoomail.com" $sSignOut = "Sign Out" $username = "XXXX" $password = "xxxx" $oIE = _IECreate ($url, 1) $title = "Yahoo" WinSetState($title, "", @SW_MAXIMIZE) $o_form = _IEFormGetObjByName ($oIE, "login_form") $o_login = _IEFormElementGetObjByName ($o_form, "login") $o_password = _IEFormElementGetObjByName ($o_form, "passwd") _IEFormElementSetValue ($o_login, $username) _IEFormElementSetValue ($o_password, $password) _IEFormSubmit ($o_form, 0) _IELoadWait ($oIE) ControlSend($title, "", "Internet Explorer_Server1", "^+p"); Yahoo had a shortcut to hit "compose" $oForm = _IEFormGetObjByName($oIE, "compose") $oAttach = _IEFormElementGetObjByName($oForm, "attachfiles") $oAttach.click ; Attach stuffs here $oAttachForm = _IEFormGetObjByName($oIE, "attachments") $oAttachFiles = _IEFormElementGetObjByName($oAttachForm, "attachtop") $oAttachFiles.click I used a shortcut key command for composing a new message, and only hit the add attachments button, and then the attach files button on that page. Hopefully that helps you get on your way. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
canlimero Posted November 27, 2006 Author Share Posted November 27, 2006 Well Thanks for your answer but I think you did it with the old Yahoo webmail. My problem is with the New Beta Yahoo Webmail. But thanks very much Link to comment Share on other sites More sharing options...
mikehunt114 Posted November 27, 2006 Share Posted November 27, 2006 Yeah, you didn't provide any source. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
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