Jump to content

Search the Community

Showing results for tags 'dupes'.



More search options

  • 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


Location


WWW


Interests

Found 1 result

  1. Cannot get my head around this...I have an array of X, and in that array each index has 3 parts, I need to find the unique indexes of the main array so main array would be [0] ???|abc|down [1] ???|abc|downorflapping [2] ???|ccc|ccc [3] ???|ddd|ddd [4] ???|xyz|down [5] ???|xyz|unresponsive so that is the array that comes in, and I think I need to break that up in another array and then compare it to each other, but I am not able to get my head around it...the first element does not matter, but if the second element is found anywhere else in the main array, I need to take only one of them, I would like that to be a variable passed, that way I can call it more then once and get the unique values I am looking for...Anyone got an idea? I have tried many different ways but cannot seem to get it right $aListAlerts[6] = ["???|abc|down", "???|abc|downorflapping", "???|ccc|ccc", "???|ddd|ddd", "???|xyz|down", "???|xyz|unresponsive"] _ArrayDisplay($aListAlerts, 'all alerts') Local $aNewArray[2] For $x = 0 To UBound($aListAlerts) - 1 Local $aTestArray = StringSplit($aListAlerts[$x], '|', 2) If UBound($aTestArray) <= 1 Then ContinueLoop ConsoleWrite($x & ' X ' & $aListAlerts[$x] & @CRLF) For $y = 0 To UBound($aListAlerts) - 1 If $y = $x Then ContinueLoop If StringInStr($aListAlerts[$y], $aTestArray[1]) Then Local $aTestArray2 = StringSplit($aListAlerts[$y], '|', 2) ConsoleWrite($y & ' Y ' & $aListAlerts[$y] & @CRLF) If UBound($aTestArray2) <= 1 Then ContinueLoop If $aTestArray2[2] <> $aTestArray[2] Then If $aTestArray2[2] = 'Down' Then If $aTestArray[2] = 'DownOrFlapping' Then If _ArraySearch($aNewArray, $aListAlerts[$x]) <> @error Then _ArrayAdd($aNewArray, $aListAlerts[$x]) ExitLoop EndIf EndIf ElseIf $aTestArray2[2] = 'DownOrFlapping' Then If $aTestArray[2] = 'Down' Then If _ArraySearch($aNewArray, $aListAlerts[$x]) <> @error Then _ArrayAdd($aNewArray, $aListAlerts[$x]) ExitLoop EndIf EndIf Else If _ArraySearch($aNewArray, $aListAlerts[$x]) = @error Then _ArrayAdd($aNewArray, $aListAlerts[$x]) ExitLoop EndIf EndIf EndIf EndIf Next Next _ArrayDisplay($aNewArray) edit does not look like tags are working? edit - learned how to post code yea
×
×
  • Create New...