anilmanyam Posted March 28, 2011 Share Posted March 28, 2011 I am a newbie and trying to do a simple task to automate navigation through a website When i open the url with the _IEcreate function a new window opens and i am able to click any link on it Once the control navigates to the next page i am not able to click on any link Here's my script #include <IE.au3> $URL= "http://www.rediff.com" $IE = _IECreate ("http://www.rediff.com") WinActivate("[CLASS:IEFrame]","") WinSetState("[CLASS:IEFrame]", "", @SW_MAXIMIZE) _IELoadWait($IE) $string1 = "News" _IELinkClickByText($IE,$string1) ;Control navigates to the next page now string2 = "More New Stories" _IELinkClickByText($IE,$st2) ; Not working ;I guess $IE still points to "http://www.rediff.com" ;What do i need to do to make $IE point to the current page now so that i can click a link on it Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 28, 2011 Moderators Share Posted March 28, 2011 anilmanyam,I am a newbieObviously so as you have posted your question in a section clearly marked as "Example scripts - This is not a general support forum!". But welcome to the AutoIt forum anyway - I have asked for your thread to be moved to the correct section. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JohnOne Posted March 28, 2011 Share Posted March 28, 2011 Probably because there is no $st2 variable. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
anilmanyam Posted March 28, 2011 Author Share Posted March 28, 2011 Probably because there is no $st2 variable.that was a typing mistake while posting.... it is _IELinkClickByText($IE,$string2)So wats wrong....I am not getting any error... and the last couple of lines execute but to no effect Link to comment Share on other sites More sharing options...
DaleHohm Posted March 28, 2011 Share Posted March 28, 2011 Are you running this in SciTe with F5? If not, do so and look at thte messages in the console at the bottom. You say you rea not getting an error, but you are not checking the return status of _IELinkClickByText, so you would not know unless you can see the console. 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...
anilmanyam Posted March 28, 2011 Author Share Posted March 28, 2011 Are you running this in SciTe with F5? If not, do so and look at thte messages in the console at the bottom. You say you rea not getting an error, but you are not checking the return status of _IELinkClickByText, so you would not know unless you can see the console.DaleDale there's a warning which says "Warning from function _IELinkClickByText, $_IEStatus_NoMatch"I am having a hard time understanding what's wrong with the script and why i am not able to click on any link after i navigate successfully to the next page..I would appreciate your help very much.Thanks in advanceAnil 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