GetInternalLink

Gets the element - internal document link of all, satisfying the specified conditions

Syntax

function GetInternalLink(aIndex: integer = -1; aAttributes, aValues: array of string = [];
  Strong: boolean = false; aAntiAttributes, aAntiValues: array of string = []; 
  aAntiStrong: boolean = false): TCSElement;

Parameter

  • aIndex
    • type: integer
    • functions: index of the desired element
  • aAttributes
    • type: array of string
    • functions: array of attributes of the desired element
  • aValues
    • type: array of string
    • functions: array of attribute values ​​corresponding to the array of attributes of the desired element
  • aStrong
    • type: boolean
    • functions: flag of match precision of the attribute values
  • aAntiAttributes
    • type: array of string
    • functions: array of exclusive attributes
  • aAntiValues
    • type: array of string
    • functions: array of values of exclusive attributes
  • aAntiStrong
    • type: boolean
    • functions: flag of match precision of the exclusive attribute values

Returned value

  • type: TCSElement
  • functions: структура, содержащая параметры найденного элемента

Notes

  • When searching for elements script enumerates all the elements that have values ​​aValues of aAttributes ​​attributes . Of these elements, the script selects the elements that are not have value aAntiValues ​​of aAntiAttributes attributes. If aStrong flag is true, the elements are found, the values ​​ aValues ​​of aAttributes properties of which are strictly equal to the specified (sensitive search is not considered). Otherwise, elements will be found in aAttributes property values of ​​which include the appropriate values ​​aValues. Similarly, with the flag aAntiStrong.
  • If the index of the desired element aIndex is -1, it will be obtained a random element from the found
  • If no elements are found, the fields of the resultant structure will be empty
  • Found elements will be highlighted by a dotted frame
  • Internal link - a link that refers to one of the documents of loaded site

Examples

  1. //Get a random element from all internal page links,
    //which have a value of "class" atribute equals "decorated"
    var link:=GetInternalLink(-1,['class'],['decorated'],true);