Sandy89

Search text in more secured internal page

1 post in this topic

Hi all,

i am working with company internal web page, where i am getting warnings for IE functions since the declared object will become invalid. i want to count the text "NEW" in a web page. Screenshot is attached. Please help me on this.

the below code is not working since i can't declare the page as an object. (i will be routed to this page through some other links)

$sText = _IEBodyReadText($oIE)
 

 

2017-01-25_16h56_41.png

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

  • Similar Content

    • david1337
      By david1337
      Hi guys
      I have 3 txt files, and the script searches them, to find the txt file containing my username.
      If found in one of the txt files, an msgbox will tell which txtfile my username was found in. Works fine.
      ;\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Global $Text[3] ;If changed, remember to change multiple places in the script. $Text[0] = ("01_TextFile") $Text[1] = ("02_TextFile") $Text[2] = ("03_TextFile") Global $DirforTxtFiles = "C:\Temp\" $username = @UserName ;pulls username that is logged in ;\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ ; SCRIPT START For $i = 0 to 3 - 1 $TextFile = FileOpen($DirforTxtFiles & $Text[$i] & ".txt", 0) $ReadText = FileRead($TextFile) FileClose($TextFile) If StringRegExp($ReadText, $username) Then Call("MainScript") EndIf Next Func MainScript() MsgBox(0,"USER FOUND", "In following textfile: " & $Text[$i]) EndFunc  
       
      But now I want the script to do something else, if my username is NOT found in any of the txtfiles
      The following example below here doesn't work, since the Else statement is placed inside the For loop, So it will run the Else statement, every time the StringRegExp doesn't find my username in a txtfile.
      ;\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Global $Text[3] ;If changed, remember to change multiple places in the script. $Text[0] = ("01_TextFile") $Text[1] = ("02_TextFile") $Text[2] = ("03_TextFile") Global $DirforTxtFiles = "C:\Temp\" $username = @UserName ;pulls username that is logged in ;\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ ; SCRIPT START For $i = 0 to 3 - 1 $TextFile = FileOpen($DirforTxtFiles & $Text[$i] & ".txt", 0) $ReadText = FileRead($TextFile) FileClose($TextFile) If StringRegExp($ReadText, $username) Then Call("MainScript") Else Call("NotInTextFile") EndIf Next Func MainScript() MsgBox(0,"USER FOUND", "In following textfile: " & $Text[$i]) EndFunc ;\/___________________________________________________________________________\/ Func NotInTextFile() MsgBox(0,"", "USER NOT IN ANY TEXTFILE") EndFunc  
      What it SHOULD do, is search the txtfiles for my username, and then when all the searching is done, it should react based on the search result.
      The answer might be quite obvious, but I'm stuck at this point.
       
      Any ideas would be much appreciated