Herb191 Posted September 14, 2011 Share Posted September 14, 2011 I need something similar to _IELinkClickByText. I can’t use _IECreate to go the URL because I want to track the link analytics on the website. Link to comment Share on other sites More sharing options...
Ned Posted September 14, 2011 Share Posted September 14, 2011 You can keep the IE window hidden by setting the _IECreate $f_visible parameter to '0'. You should also be able to click link by text or index while it is hidden. If you need more help, you need to be more detailed in what the issue is. Maybe post a snippet of your script. Link to comment Share on other sites More sharing options...
Herb191 Posted September 14, 2011 Author Share Posted September 14, 2011 (edited) You can keep the IE window hidden by setting the _IECreate $f_visible parameter to '0'. You should also be able to click link by text or index while it is hidden. If you need more help, you need to be more detailed in what the issue is. Maybe post a snippet of your script. As I said in my first post I can't use _IECreate. And here is some example code. #include <IE.au3> $oIE = _IECreate("http://google.com/", 0, 0) $oBody = _IETagNameGetCollection($oIE, "body", 0) _IEDocInsertHTML($oBody, '<a href="http://yahoo.com/" target="_blank">Test link</a><br />', "afterbegin") ;I need something other than _IELinkClickByText so I can click on the link and the new window is not visible _IELinkClickByText($oIE, "Test link", 0, 0) _IEQuit($oIE) Edited September 14, 2011 by Herb191 Link to comment Share on other sites More sharing options...
Ned Posted September 15, 2011 Share Posted September 15, 2011 ah, missed that in the first post. I'm not really that experienced with auto it nor exactly sure what your trying to achieve, but maybe you can try click link by index. Link to comment Share on other sites More sharing options...
Herb191 Posted September 15, 2011 Author Share Posted September 15, 2011 Well it's by far not the best solution but I found a work around. I had to set IE's default setting to always open windows in a new tab. Then I used this code: #include <IE.au3> $oIE = _IECreate("http://google.com/", 0, 0) $oBody = _IETagNameGetCollection($oIE, "body", 0) _IEDocInsertHTML($oBody, '<a href="http://yahoo.com/" target="_blank">Test link</a><br />', "afterbegin") WinMove("Google - Windows Internet Explorer", "", -1000, -1000) ;_IELinkClickByText will work now because you can't see the window when it clicks a new link _IELinkClickByText($oIE, "Test link", 0, 1) $oIE2 = _IEAttach("http://yahoo.com/", "url") Sleep(5000) _IEQuit($oIE2) _IEQuit($oIE) 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