KlemsonGuy Posted February 23, 2006 Share Posted February 23, 2006 I'm having a little bit of trouble getting the _IEClickLinkByText to work with an asp.net page. When I try the following code, I am able to get everything to work except that one command. If I pull up the page and save all of the source code as HTML to my local hard drive and then run the script, it works without an issue. Is one of the limitiations that it will not work with a page written in asp.net? Here is my code: $oIE = _IECreate() _IENavigate($oIE, "http://par", 1) $oMenuFrame = _IEFrameGetObjByIndex($oIE, 0); get a reference to the menu frame _IEClickLinkByText($oMenuFrame,"Administer Place Group", 0, 1) Also, just a side question, since I have the browser object stored in the $oIE object variable, is there a way to maximize the window without using the text in the title bar (as in the WinSetState command)? Link to comment Share on other sites More sharing options...
Valuater Posted February 23, 2006 Share Posted February 23, 2006 "Welcome to Autoit 1-2-3" has great examples..and IE.au3 Builder can help you with examples and reading source-tags etc all in my signature below 8) Link to comment Share on other sites More sharing options...
KlemsonGuy Posted February 23, 2006 Author Share Posted February 23, 2006 "Welcome to Autoit 1-2-3" has great examples..andIE.au3 Builder can help you with examples and reading source-tags etcall in my signature below8)It's not really that I'm having a problem understanding how to use it. It works just fine when the page is standard HTML. It doesn't seem to find the link, however, when the page is an asp.net page (extension of aspx). Does the script treat them differently? Link to comment Share on other sites More sharing options...
DaleHohm Posted February 23, 2006 Share Posted February 23, 2006 I'm having a little bit of trouble getting the _IEClickLinkByText to work with an asp.net page. When I try the following code, I am able to get everything to work except that one command. If I pull up the page and save all of the source code as HTML to my local hard drive and then run the script, it works without an issue. Is one of the limitiations that it will not work with a page written in asp.net? Here is my code: $oIE = _IECreate() _IENavigate($oIE, "http://par", 1) $oMenuFrame = _IEFrameGetObjByIndex($oIE, 0); get a reference to the menu frame _IEClickLinkByText($oMenuFrame,"Administer Place Group", 0, 1) Also, just a side question, since I have the browser object stored in the $oIE object variable, is there a way to maximize the window without using the text in the title bar (as in the WinSetState command)?There should be no reason that this would not work with an aspx page. Once the page has been rendered, the browser does not know or care that it is ASP.net rather than simply HTML. Whatever your problem is, it is not because it is aspx. Here's how to get a handle for an IE window and then maximize it: #include <IE.au3> $oIE = _IECreate() $hHWnd = _IEGetProperty($oIE, "hwnd"); get handle ; This next line won't be needed in the next IE.au3 release If Not IsHWND($hHWnd) Then $hHWnd = HWnd($hHWnd); convert to handle variant WinSetState($hHWnd, "", @SW_MAXIMIZE); maximize 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...
KlemsonGuy Posted February 23, 2006 Author Share Posted February 23, 2006 There should be no reason that this would not work with an aspx page. Once the page has been rendered, the browser does not know or care that it is ASP.net rather than simply HTML. Whatever your problem is, it is not because it is aspx. Here's how to get a handle for an IE window and then maximize it: #include <IE.au3> $oIE = _IECreate() $hHWnd = _IEGetProperty($oIE, "hwnd"); get handle ; This next line won't be needed in the next IE.au3 release If Not IsHWND($hHWnd) Then $hHWnd = HWnd($hHWnd); convert to handle variant WinSetState($hHWnd, "", @SW_MAXIMIZE); maximize Dale Thanks for the assistance on maximizing the window. I figured out the issue. To put it simply, the issue is that I'm an idiot. I didn't take notice that whoever developed this page, put a frame inside a frame for no reason whatsoever. Sorry for the headache. 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