tradertt Posted July 19, 2006 Share Posted July 19, 2006 HiDoes anyone know how to code a AU3 script that can:1) Search for a string in the active internet explorer window2) String can be like http://www.abc.comhttp://www.yahoo.comhttp://www.fhd.comso search for the string http:// (if there are more than 1 text string of http:// then it will paste all the http:// strings.3) Copy the whole string4) Paste it in a text file and move on to the next line5) End the programPlease assist.Thank you Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
Simucal Posted July 19, 2006 Share Posted July 19, 2006 HiDoes anyone know how to code a AU3 script that can:1) Search for a string in the active internet explorer window2) String can be like http://www.abc.comhttp://www.yahoo.comhttp://www.fhd.comso search for the string http:// (if there are more than 1 text string of http:// then it will paste all the http:// strings.3) Copy the whole string4) Paste it in a text file and move on to the next line5) End the programPlease assist.Thank youIf all you are trying to do is write the links from a page into a file, you dont need any of the copy/paste nonsense. I would use either IE.au3 and get the LinkCollection or INetGetSource and parse out links with StringRegExp. Then write your findings to a file. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
tradertt Posted July 19, 2006 Author Share Posted July 19, 2006 Linkcollection is part of IE.au3 or is it an externel macro? Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
DaleHohm Posted July 19, 2006 Share Posted July 19, 2006 _IELinkGetCollection -- part of IE.au3 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...
Moderators big_daddy Posted July 19, 2006 Moderators Share Posted July 19, 2006 Something like this should work: #include <IE.au3> _IEErrorHandlerRegister() $sURL = "your-webpage.com" $oIE = _IEAttach($sURL, "url") If Not IsObj($oIE) Then $oIE = _IECreate($sURL) EndIf $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks FileWriteLine("Links.txt", $oLink.href) Next Link to comment Share on other sites More sharing options...
tradertt Posted July 25, 2006 Author Share Posted July 25, 2006 Hi sorry for the late reply. The above does not work as the link that I want to capture is only a TEXT not a Hyperlinkhttp://www.arcadecity.net/index.php?page=l...de&submit=1Thank you for submitting your link. It has been submitted for moderator approval and should show up shortly. You can start linking to us using this link: http://www.arcadecity.net/link.php?action=in&id=126 Take a look at it - It is only a text link - how can I extract only that specific link out Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
DaleHohm Posted July 25, 2006 Share Posted July 25, 2006 Hi sorry for the late reply. The above does not work as the link that I want to capture is only a TEXT not a Hyperlinkhttp://www.arcadecity.net/index.php?page=l...de&submit=1Thank you for submitting your link. It has been submitted for moderator approval and should show up shortly. You can start linking to us using this link: http://www.arcadecity.net/link.php?action=in&id=126 Take a look at it - It is only a text link - how can I extract only that specific link outI don't see anything like this on the page you supplied.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...
tradertt Posted July 25, 2006 Author Share Posted July 25, 2006 There is only text in that page but there is a http:// tect there. Do you see it? Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
tradertt Posted July 25, 2006 Author Share Posted July 25, 2006 http://www.games2web.com/index.php?page=li...de&submit=1Use this instead. So sorry about it. Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
tradertt Posted July 25, 2006 Author Share Posted July 25, 2006 expandcollapse popupOpt("MustDeclareVars",1) #include <IE.au3> Dim $variable, $oIE, $o_IE, $o_object Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) WinActivate("Microsoft Excel") WinWait("Microsoft Excel") Send("{DOWN}{CTRLDOWN}c{CTRLUP}") $o_IE = _IECreate () $variable=ClipGet() _IENavigate($o_IE, $variable) #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Sleep(5000) WinActivate("Internet Explorer") WinActivate("AutoFill - RoboForm") WinWait("AutoFill - RoboForm") Sleep(1000) Send("{ALTDOWN}s{ALTUP}") #endregion --- ScriptWriter generated code End --- _IELoadWait ($o_object) Sleep(10000) #region --- ScriptWriter generated code Start --- WinActivate("Microsoft Internet Explorer") WinWaitActive("Microsoft Internet Explorer") Send("{SHIFTDOWN}{F10}{SHIFTUP}") Sleep(500) Send("v") WinActivate("Notepad","") WinWaitActive("Notepad","") Send("{CTRLDOWN}f{CTRLUP}") WinActivate("Find","Fi&nd what:") WinWaitActive("Find","Fi&nd what:") Send("you can start linking to us{ENTER}") Sleep(500) Send("{ESC}") WinActivate("Notepad","") WinWaitActive("Notepad","") Send("{DOWN}{HOME}{SHIFTDOWN}{END}{SHIFTUP}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{F4}{ALTUP}") #endregion --- ScriptWriter generated code End --- This is my latest code - however at the portion: _IELoadWait ($o_object) I want it to wait till I have submitted the form and it has loaded the next page successfully before viewing the source of the webpage. how can I do that? Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
DaleHohm Posted July 25, 2006 Share Posted July 25, 2006 I don't understand your last question. To get the link you are looking for however, you can use this technique: #include <IE.au3> $tryAttach = True $oIE = _IECreate("http://www.games2web.com/index.php?page=link_trade&submit=1", $tryAttach) $sAllHTML = _IEBodyReadHTML($oIE) ; you can get all HTML and parse it $sAllText = _IEBodyReadText($oIE) ; you can get all Text and parse $oTable = _IETableGetCollection($oIE, 22) ; 23rd table on the page has your text $sTableText = $oTable.innerText ; get just the text in that table and parse it 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