Juanse Posted July 20, 2005 Share Posted July 20, 2005 I want to open the Hotmail Inbox directly using a script. But when I log in I can't virtualy click on "Inbox": I don't know why. Someone could help me? Link to comment Share on other sites More sharing options...
Valuater Posted July 20, 2005 Share Posted July 20, 2005 take a look at this threadhttp://www.autoitscript.com/forum/index.ph...574&hl=Hotmail#hope it helps8) Link to comment Share on other sites More sharing options...
Juanse Posted July 21, 2005 Author Share Posted July 21, 2005 No, I've already seen that posts. I want to click on "Inbox" after loging-in Thanks for your help anyway Link to comment Share on other sites More sharing options...
Valuater Posted July 21, 2005 Share Posted July 21, 2005 maybe this???http://www.autoitscript.com/forum/index.php?showtopic=12641#8) Link to comment Share on other sites More sharing options...
DaleHohm Posted July 21, 2005 Share Posted July 21, 2005 Please post what you tried using to do this and we'll see what we can do to help. There are several Inbox links... 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 Link to comment Share on other sites More sharing options...
randallc Posted July 21, 2005 Share Posted July 21, 2005 [From other links ;] Hi, I don't know if Dale has a "com" answer (so far that page is in a frame not reading from Dale's UDFs, I think); and I don't know how to do it in AutoIT. The workaround (post it if you know the syntax please!) is: 1. Wait till control text in status bar says "Opening page", then wait till it says "Done" [or any other way you know to check the page is fully loaded]. 2. Send "control-F", wait for find window, to find "My Messages"; "enter" 3 escape the find window. 4. send "shift-tab" (highlights that Link) 5. send "spacebar" Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
DaleHohm Posted July 21, 2005 Share Posted July 21, 2005 Actually, if you use the previous script to login to Hotmail, it will take you to the "Today" page... The following two lines will click on the Mail tab and then the Inbox: _IEClickLinkByText($oIE,"Mail") _IEClickLinkByText($oIE,"Inbox") 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 Link to comment Share on other sites More sharing options...
randallc Posted July 21, 2005 Share Posted July 21, 2005 Actually, if you use the previous script to login to Hotmail, it will take you to the "Today" page...The following two lines will click on the Mail tab and then the Inbox:_IEClickLinkByText($oIE,"Mail") _IEClickLinkByText($oIE,"Inbox")<{POST_SNAPBACK}>That's great! - but still needs a "sleep(30000)" (30secs) wait for me; is there a way to tell when to send the textclicks?Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
DaleHohm Posted July 21, 2005 Share Posted July 21, 2005 I'm not sure why... I built in an _IELoadWait() by default into the _IEFormSubmit and the _IEClickLinkByxxx so it should wait for the load to complete before mving to the next command. 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 Link to comment Share on other sites More sharing options...
randallc Posted July 21, 2005 Share Posted July 21, 2005 Hi, Dale, Have you tried it also to confirm it isn't just me? It is also the case for the other sites, as the time always shows for the end of the macro in the console way before any of those sites have finally loaded? Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
DaleHohm Posted July 21, 2005 Share Posted July 21, 2005 Right. It is there in the _IEClickLinkxxx functions but not the _IEFormSubmit (because FormSubmit uses a form object instead of the top level window, so the ReadyState property doesn't apply). I believe that all of the functions that I built the LoadWait into have an optional $f_wait parameter where you can turn it off and make it asynchronous. For those functions there it isn't being done automatically, you need to call it yourself, i.e. _IEFormSubmit($oForm) _IELoadWait($oIE) 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 Link to comment Share on other sites More sharing options...
randallc Posted July 21, 2005 Share Posted July 21, 2005 (edited) Hi,Here' my mixed COM/ wait workaround; the "sleep"s may vary on your situation; thanks again to Dale.#include <IE.au3>dim $xAutoItSetOption("WinTitleMatchMode", 2); Create a browser window and navigate to hotmail$oIE = _IECreate()_IENavigate($oIE, "http://www.hotmail.com");_IENavigate($oIE, "http://login.passport.net"); get pointers to the login form and username and password fields$o_form = _IEFormGetObjByName($oIE, "f1")$o_login = _IEFormElementGetObjByName($o_form, "login")$o_password = _IEFormElementGetObjByName($o_form, "passwd"); Set field values and submit the form_IEFormElementSetValue($o_login, "USER@hotmail.com")_IEFormElementSetValue($o_password, "Password")_IEFormSubmit($o_form)while not StringInStr($x,"Opening") sleep(20) $x = StatusbarGetText("Internet Explorer")wendwhile not StringInStr($x,"Done") sleep(20) $x = StatusbarGetText("Internet Explorer")wend_IEClickLinkByText($oIE,"Mail");_IEClickLinkByText($oIE,"Inbox")ExitBest, Randall Edited July 21, 2005 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Juanse Posted July 21, 2005 Author Share Posted July 21, 2005 Right. It is there in the _IEClickLinkxxx functions but not the _IEFormSubmit (because FormSubmit uses a form object instead of the top level window, so the ReadyState property doesn't apply).I believe that all of the functions that I built the LoadWait into have an optional $f_wait parameter where you can turn it off and make it asynchronous. For those functions there it isn't being done automatically, you need to call it yourself, i.e._IEFormSubmit($oForm) _IELoadWait($oIE)Dale<{POST_SNAPBACK}>It still doesn't work. I need to make a Sleep function to send the click Link to comment Share on other sites More sharing options...
seandisanti Posted July 21, 2005 Share Posted July 21, 2005 It still doesn't work. I need to make a Sleep function to send the click <{POST_SNAPBACK}>ok... so add a sleep() statement... ? for best results, add it before the statement that is executing too early... Link to comment Share on other sites More sharing options...
DaleHohm Posted July 21, 2005 Share Posted July 21, 2005 Right, what is happening is that the click is being sent and the readystate is being checked by the next AutoIt command before it has a chance to change as a result of the click. I'm going to add a configurable delay into the LoadWait in the next release, but in the mean time, try adding a Sleep(500) after the submit. 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 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