Sign in to follow this  
Followers 0
sunburn

Need help geting an object in _IE (possibly a form)

3 posts in this topic

Hi to all,

I had a script that worked which basically navigated through yahoo email filled in the blanks and sent email to me, but yahoo has changed the way their html is and it no longer works. I know there are better ways to send an email, but I cant get UDF _INetSmtpMailCom to work and this was working for me. So basically I need someones expertise to in HTML to tell me what they changed. I'm thinking that the object is now located in a form. If that is the case, what is the forms name

I had used

$button = _IEGetObjById($openIE, "global_compose_top")
            _IEAction($button, "click")
            _IELoadWait($openIE)

Here is the section of HTML

class="floatleft"> <form name="frmChkMailtop" action="showFolder;
_ylc=X3oDMTBuc3I1djM0BF9TAzM5ODMwMTA0MARhYwNjaGtNYWls?&.rand=1384358994&order=down&pSize=100&tt=119" 
method="GET"><p><input  type="submit" class ="inputbutton" id="global_check_mail_top" title="Check for new 
mail" value="Check Mail" /><input type="hidden" name=".rand" value="1384358994" /></p></form><form 
action="compose?&.rand=1384358994" method="GET"><p><input  type="submit" class ="inputbutton" 
id="global_compose_top" title="Compose a new message" value="Compose" /><input type="hidden" name=".rand" 
value="1384358994" /></p></form></div><div id="searchtestfieldstop" class="searchforms">

So if I were to now use this

$oForm = _IEFormGetObjByName ($oIE, "")
$button = _IEFormElementGetObjByName ($oForm, "global_compose_top")
_IEaction ($button, "click")

What is the form name? and would this action syntax "click" the compose button?

All I'm trying to do is navigate to the "compose" mail page here after logging onto the "clasic" version of Yahoo mail. Yahoo also recently removed all keyboard shortcuts for this as well.

Share this post


Link to post
Share on other sites



See the remarks for _IEFormGetObjByName in the helpfile for information on what to do if there is no Name or Id.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

See the remarks for _IEFormGetObjByName in the helpfile for information on what to do if there is no Name or Id.

Dale

Thanks for the reply,

I did what you suggested, _IEformgetobjbyname remarks suggested

$oForms = _IEFormGetCollection ($openIE)
MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page")
For $oForm In $oForms
    MsgBox(0, "Form Info", $oForm.name)
Next

which I tried, I'm pretty sure the form name I needed came up as "0" . I then put that into

$oForm = _IEFormGetObjByName ($openIE, "0")
            $button = _IEFormElementGetObjByName ($oForm, "global_compose_top")
            _IEaction ($button, "click")
which returned an @error of '3' ie invalid data type.

In trying to figure out a "work around" how would I find the word "compose" coordinates on a window, then click on the 'c' of that word? Maybe I'm being to simplific..... other ways I thought about doing this was with a maximize on the windo, but depending on what toolbars were open, it would always change the coordinates of what I was trying to click..... Any thoughts..

Sunburn

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