Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/10/2019 in all areas

  1. For the fun, a variation of jchd's using StringRegExp with param 4 #include <Array.au3> Local $examplelines = '<input type="checkbox" id="route0" name="route0" checked></td><td>1.1.1.1</td><td>2.2.2.2</td><td>3.3.3.3</td>' & _ '<input type="checkbox" id="route1" name="route1" ></td><td>4.4.4.4</td><td>5.5.5.5</td><td>6.6.6.6</td>' & _ '<input type="checkbox" id="route2" name="route2" checked></td><td>7.7.7.7</td><td>8.8.8.8</td><td>9.9.9.9</td>' Local $aRes = StringRegExp($examplelines, '(?i)name="([^"]+)"\h*(\w*).*?<td>([^<]*)</td><td>([^<]*)</td><td>([^<]*)</td>', $STR_REGEXPARRAYGLOBALFULLMATCH) ;_ArrayDisplay($aRes[0]) Local $n = UBound($aRes), $a[$n][5] For $i = 0 To $n-1 For $j = 1 To 5 $a[$i][$j-1] = ($j = 2 ? (($aRes[$i])[$j] = "checked") : ($aRes[$i])[$j]) Next Next _ArrayDisplay($a)
    1 point
  2. Found the issue, which was indeed a bug. Please stand by for an updated bundle... CodeScannerCrypter bundle version 2.4 is now released, with many thanks to @Roman for flagging the bug.
    1 point
  3. MightyWeird, The @...Dir macros do not have a trailing backslash so you have to add it. And you are calling the function from within itself - this is known as recursion and usually leads to tears, see the Recursion tutorial in the Wiki to understand what is going on. This works for me: Const $SearchFordir1 = @ProgramFilesDir & "\aaaa" Const $SearchFordir2 = @ProgramFilesDir & "\bbbb" _IsInstalled($SearchFordir1) _IsInstalled($SearchFordir2) Func _IsInstalled($DisplaydirName) $iFileExists = FileExists($DisplaydirName) If $iFileExists Then MsgBox($MB_SYSTEMMODAL, "", "The file exists." & @CRLF & "FileExist returned: " & $iFileExists) Else MsgBox($MB_SYSTEMMODAL, "", "The file doesn't exist." & @CRLF & "FileExist returned: " & $iFileExists) EndIf EndFunc M23
    1 point
  4. or a blanket requirement that anytime a mod is engaged, we all stand down? And if they pinned that to the announcements?
    1 point
  5. I have an idea I want to share with you @Jos. Recently, we see so many times ppl asking for help under a false request, in fact asking for the community to provide spoon-feeding software, free of charge scripts, slave programmatic efforts. Do you think it is time for mods and devs to react to it like you would react for game-automation, etc ? When you ask for basic code from the OP, no one should be allowed to provide code until some effort is made by OP ?
    1 point
×
×
  • Create New...