Jump to content
Sign in to follow this  
reida

Recursively on a site?

Recommended Posts

The help file is your friend. Look for Loop Statements.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

Can you please post what you have tried so far?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

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 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

@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!

Share this post


Link to post
Share on other sites

Excuse, I am not assured that correctly has formulated the thought on script transitions on all pages of a site. Therefore has asked)

Share this post


Link to post
Share on other sites

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 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...