Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/24/2019 in all areas

  1. As soon as you find the first one and delete it, "exitloop" and exit.
    1 point
  2. I've seen installers that do all of it. @JLogan3o13: you seem to know some more about this, care to enlighten us? Thanks
    1 point
  3. I don't think you used it correctly, because it works fine for me, did you change your variables to @CRLF@@CRLF@ and remove the quotes as I did in the example above? PS: With the code above you don't actually have to use Opt("ExpandVarStrings", 0). Also if you don't want to use that method then you can use: $sMsg = Execute($aMsgBoxText[2][1])
    1 point
  4. You can use something like the following: Opt("ExpandVarStrings", 1) $sMsg = "This update fixes errors and security problems of your computer. You should install the update as soon as possible.@CRLF@@CRLF@Attention: The process takes up to 10 minutes. Your system will be restarted automatically. Turning it off before completing this reboot may result in system errors!@CRLF@@CRLF@Save your work before continuing!" Opt("ExpandVarStrings", 0) MsgBox(4096, "", $sMsg)
    1 point
  5. Deye

    indexing idea

    Then In this case, It isn't exactly "_arrayadd" that is needed: #include <Array.au3> Local $Array[4][9] = [ _ ["A", 1, 2, 3, 4, 5], _ ["B", 1, 2], _ ["C", 1, 2, 3, 4], _ ["D", 1, 2, 3, 4, 5]] _ArrayAddInsert($Array, 0, 9) _ArrayDisplay($Array) Func _ArrayAddInsert(ByRef $Array, $iRow, $Vadd) $Array[$iRow][ _ UBound(StringRegExp(_ArrayToString($Array, "|", $iRow, $iRow), "([?|])+", 3)) _ ] = $Vadd EndFunc ;==>_ArrayAddInsert Deye
    1 point
  6. jdelaney

    indexing idea

    array of arrays #include <Array.au3> Local $a1[6] = ["A", 1, 2, 3, 4, 5] Local $a2[3] = ["B", 1, 2] Local $a3[5] = ["C", 1, 2, 3, 4] Local $a4[6] = ["D", 1, 2, 3, 4, 5] Local $aHolder[4] = [$a1,$a2,$a3,$a4] ArrayAdd($aHolder,9) ; just to display: For $i = 0 To UBound($aHolder)-1 _ArrayDisplay($aHolder[$i]) Next Func ArrayAdd(ByRef $a, $iNum) For $i = 0 To UBound($a)-1 Local $aTemp = $a[$i] _ArrayAdd($aTemp,$iNum) $a[$i] = $aTemp Next EndFunc
    1 point
  7. Malkey

    indexing idea

    This example appends a new value to the first occurring blank column of each row in an array. #include <Array.au3> Local $Array[4][6] = [ _ ["A", 1, 2, 3, 4, 5], _ ["B", 1, 2], _ ["C", 1, 2, 3, 4], _ ["D", 1, 2, 3, 4, 5]] _ArrayDisplay($Array, "Before") $aArr = _ArrayAppendToEachRow($Array, 9) _ArrayDisplay($aArr, "After") Func _ArrayAppendToEachRow(ByRef $Array, $Value) Local $s = _ArrayToString($Array) ;ConsoleWrite($s & @CRLF) $s = StringRegExpReplace($s, "(?m)([^\|\v]+)$|(\|+)$", "${1}|" & $Value) ;ConsoleWrite($s & @CRLF) Local $a[0][UBound($Array, 2) + 1] _ArrayAdd($a, $s) Return $a EndFunc ;==>_ArrayAppendToEachRow
    1 point
  8. Add some com object error handling and run it again from within ScITE and if it closes again, it should provide some returned value in the console.
    1 point
  9. Nine

    indexing idea

    Array of arrays ?
    1 point
  10. orbs

    indexing idea

    hello @fraizor, welcome to AutoIt and to the forum. you will undoubtedly end up using a database, so begin with studying the SQLite UDF that ships with AutoIt. i woud begin with a two-column table, where one column stores the word, and the other stores that word occurrences, in a format of this kind: "file1.ext:1,5,9,18;file2.ext:2,3,8;" so when a new file is indexed, you scan the file for for the list of words, and add a substring to the contents of the respective column. and when you query for a word, you get all its occurrences instantly.
    1 point
  11. If you don't want to grab the matches into an array using the usual StringRegExp, to get the result as a string you have to introduce in the StringRegExpReplace a kind of negation to say : If the lines do NOT contain "items4" then fire them Here is a way : $txt = "line1,items1,testtext1" & @crlf & _ "line2,items4,testtext2" & @crlf & _ "line3,items3,testtext3" & @crlf & _ "line4,items4,testtext4" & @crlf & _ "line5,items5,testtext5" & @crlf & _ "line6,items6,testtext6" & @crlf $in = "items4" $res = StringRegExpReplace($txt, '(?m)^(.*\Q' & $in & '\E.*(*SKIP)(*F)|.*)$\R?', "") Msgbox(0,"", $res) In this alternation, the left side first matches the lines containing "items4", then (*SKIP)(*F) says 'No no, I don't want this", then all other lines (not containing "items4") are matched by the right side of the alternation and replaced by "" Edit This example doesn't replace fired lines with blank lines. To get blank lines just remove \R? (which means optional newline sequence)
    1 point
  12. Looks like Select2 is a jQuery library. Should be fairly easy to use jQuerify to gain access to the jQuery object and then trigger events as necessary.
    1 point
  13. How to? Search for a string starting with "UBX" or "FLN" ends with @yahoo.com what am I missing here? ;#include <Constants.au3> ;#include <Pacap.au3> ;#include <plug.au3> $handle__ = FileOpenDialog('OpenScure', @WorkingDir & "\", "Pcap (*.cap;*.pcap;*.log)") $IniWrite = IniWrite("_config.ini", "SETUP", "key", $handle__) $IniRead = IniRead("_config.ini", "SETUP", "key", "") ; $handle_read = FileOpen($IniRead, 0) $SaveLog = FileOpen("Results.log", 1) ; If $handle_read <> -1 Then While 1 $string = FileReadLine($handle_read) If @error Then ExitLoop $pcap = StringRegExp($string, 'UBX|FLN| (.*?)@yahoo.com\z', 3) For $i = 0 To UBound($pcap) - 1 TrayTip("Results!", $pcap[$i], 15, 1) FileWrite($SaveLog, $pcap[$i] & @CRLF) Next WEnd FileClose($handle_read) FileClose($SaveLog) Else MsgBox(0, '', 'File open error') EndIf
    1 point
×
×
  • Create New...