reida Posted August 23, 2018 Share Posted August 23, 2018 Hello. How to go on site pages recursively? Link to comment Share on other sites More sharing options...
water Posted August 23, 2018 Share Posted August 23, 2018 The help file is your friend. Look for Loop Statements. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
reida Posted August 23, 2018 Author Share Posted August 23, 2018 I know as in a cycle to pass under references from a file. How to pass similarly curl -L Link to comment Share on other sites More sharing options...
water Posted August 23, 2018 Share Posted August 23, 2018 Can you please post what you have tried so far? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
reida Posted August 23, 2018 Author Share Posted August 23, 2018 (edited) Addresses of pages are in a file ааа.txt $oURL="http://alpari.com/" $oIE = _IECreate($oURL, 0, 0) $oFile = FileOpen("aaa.txt") While 1 $oURL = FileReadLine($oFile) If @error Then ExitLoop _IENavigate($oIE, $oURL) ;EndIf Sleep(100) WEnd _IEQuit($oIE) FileClose($oFile) Edited August 23, 2018 by reida Link to comment Share on other sites More sharing options...
water Posted August 23, 2018 Share Posted August 23, 2018 Doesn't look bad. What doesn't work? Do you get an error message, script crash ...? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
reida Posted August 23, 2018 Author Share Posted August 23, 2018 It works. But how to make work without a file aaa.txt? Link to comment Share on other sites More sharing options...
reida Posted August 23, 2018 Author Share Posted August 23, 2018 (edited) That the script has found addresses of pages and has visited them. For example: http://alpari.com/, http://alpari.com/page1, http://alpari.com/page2... Edited August 23, 2018 by reida Link to comment Share on other sites More sharing options...
reida Posted August 23, 2018 Author Share Posted August 23, 2018 (edited) water. You have understood about what I ask? Forgive for my English) Edited August 23, 2018 by reida Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 23, 2018 Moderators Share Posted August 23, 2018 @reida how about you show some patience? Standard forum etiquette is to wait 24 hour to give people time to respond (you waited a whole 16 minutes). "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
reida Posted August 23, 2018 Author Share Posted August 23, 2018 Excuse, I am not assured that correctly has formulated the thought on script transitions on all pages of a site. Therefore has asked) Link to comment Share on other sites More sharing options...
water Posted August 23, 2018 Share Posted August 23, 2018 Shouldn't be too hard to code. You have a fixed and a variable part (1, 2 ...) of the page you want to open. Increment a counter and combine it with the fixed part. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
reida Posted August 23, 2018 Author Share Posted August 23, 2018 Addresses of pages are unknown to me, I know only the address of the main page. How to make transition on all pages except .jpg .rar. zip? Link to comment Share on other sites More sharing options...
water Posted August 24, 2018 Share Posted August 24, 2018 (edited) Then it becomes quite complex as you have to analyze every page. But why would you want to open all pages of a site? Edited August 24, 2018 by water reida 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
reida Posted August 24, 2018 Author Share Posted August 24, 2018 To open pages serially and to check presence of some words or word-combinations. I wish to keep the found information in a file for the further analysis. Link to comment Share on other sites More sharing options...
Gianni Posted August 24, 2018 Share Posted August 24, 2018 (edited) given that using inprudently recursive functions can cause ramifications out of control, here a simple example of a recursive approach #include <array.au3> #include <ie.au3> Global $sStartingUrl = "https://alpari.com/" Global $oIE = _IECreate() Global $aVisited[] = [''] _GoToURL_rec($sStartingUrl) MsgBox(0, "Debug", "Done.") _IEQuit($oIE) Exit ; WARNING: recursive function Func _GoToURL_rec($sUrl) If _ArraySearch($aVisited, $sUrl) = -1 Then ; url not already visited _ArrayAdd($aVisited, $sUrl) ; mark as already visited _IENavigate($oIE, $sUrl) Local $oUrls = _IETagNameGetCollection($oIE, "A") If @extended Then ; MsgBox(0, "debug @extended", @extended & "links found") For $ohyperlink In $oUrls $sHref = $ohyperlink.href ; do not remove the following check or you'll lose on the web If StringLeft($sHref, 18) = "https://alpari.com" Then ; stay in the same domain only ; furter checking on url here If Not StringInStr($sHref, "#") Then ; do not open link on same page If Not StringInStr($sHref, ".pdf") Then ; do not open pdf ; ..... add more checks if needed _GoToURL_rec($sHref) ; ---> recursion EndIf EndIf EndIf Next EndIf EndIf Return EndFunc ;==>_GoToURL_rec Edited August 24, 2018 by Chimp reida and FrancescoDiMuro 1 1 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
reida Posted August 24, 2018 Author Share Posted August 24, 2018 (edited) @Chimp Thank you so much. Edited August 25, 2018 by reida 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