Jump to content

Search the Community

Showing results for tags 'text search'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. 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)
  2. 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
×
×
  • Create New...