ausssieautomate Posted November 11, 2008 Share Posted November 11, 2008 Hi Guys/Gals,Is it possible to select a specific link on a webpage say www.google.com, "images" on a webpage that is already been created. I.e#include <IE.au3>$oIE = _IECreate("http://www.autoitscript.com"); This part omitted $sMyString = "wallpaper"$oLinks = _IELinkGetCollection($oIE)For $oLink in $oLinks $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $sMyString) Then _IEAction($oLink, "click") ExitLoop EndIfNextCheers. http://www.autoitscript.com/forum/style_im...icons/icon1.gif Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing) Link to comment Share on other sites More sharing options...
AzKay Posted November 11, 2008 Share Posted November 11, 2008 Look at _IEAttach() in place of the _IECreate() # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
dillonlim Posted November 11, 2008 Share Posted November 11, 2008 Hi Guys/Gals,Is it possible to select a specific link on a webpage say www.google.com, "images" on a webpage that is already been created. I.e#include <IE.au3>$oIE = _IECreate("http://www.autoitscript.com"); This part omitted $sMyString = "wallpaper"$oLinks = _IELinkGetCollection($oIE)For $oLink in $oLinks $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $sMyString) Then _IEAction($oLink, "click") ExitLoop EndIfNextCheers. http://www.autoitscript.com/forum/style_im...icons/icon1.gif_IECreate has an option to attach to existing window. It's just off by default. Link to comment Share on other sites More sharing options...
ausssieautomate Posted November 13, 2008 Author Share Posted November 13, 2008 _IECreate has an option to attach to existing window. It's just off by default.Thanks man I got it working now. Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing) Link to comment Share on other sites More sharing options...
ausssieautomate Posted November 13, 2008 Author Share Posted November 13, 2008 Hi Guys Gals , Sorry I thought it I had it working, I am trying to get a basic script running to get a feel for the Ie_Attach command. Can someone tell me whats wrong with this. #include <IE.au3> $oIE = _IEAttach("Google - Microsoft Internet Explorer") $oForm = _IEFormGetObjByName ($oIE, "f") $oQuery = _IEFormElementGetObjByName ($oForm, "q") _IEFormElementSetValue ($oQuery, "AutoIt IE.au3") _IEFormSubmit ($oForm) When I load the script nothing happens. Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing) Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 13, 2008 Share Posted November 13, 2008 Hi Guys Gals , Sorry I thought it I had it working, I am trying to get a basic script running to get a feel for the Ie_Attach command. Can someone tell me whats wrong with this. #include <IE.au3> $oIE = _IEAttach("Google - Microsoft Internet Explorer") $oForm = _IEFormGetObjByName ($oIE, "f") $oQuery = _IEFormElementGetObjByName ($oForm, "q") _IEFormElementSetValue ($oQuery, "AutoIt IE.au3") _IEFormSubmit ($oForm) When I load the script nothing happens. Look at the parameters for _IEAttach() in the help file. The default match is the DOCUMENT TITLE, not the WINDOW TITLE. It will work if you do this: $oIE = _IEAttach("Google - Microsoft Internet Explorer", "WindowTitle") Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
ausssieautomate Posted November 14, 2008 Author Share Posted November 14, 2008 Ah I see thanks for your help man. Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing) 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