Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/04/2023 in all areas

  1. Ahhh yesss, I didn't pay attention to this The answer to your questions is written in the definition of this nice \G spot : "matches at the beginning of the subject string OR at the end of the previous match" To solve the problem here we just have to make \G to not match at the beginning of the string StringRegExp($txt, '(?sx) (?: ^.*?Writers | \G (?!\A|</a>\s+</li>) ) .*?/nm\d+">([^<]*)', 3) So the answer to the 2nd question becomes obvious now BTW I still prefer the negative lookahead which allows to define a limit as the OP asked for
    1 point
  2. winsqlite3.dll not user sqlite dll, but winsqlite3.dll is in Windows by default. They don't change often. winsqlite3.dll is not recommendation, but that should be choice if the programmer sees fit. What is my point? The user should be able to set the sqlite dll name without _x64 in the 64bit script with default SQLite.au3.
    1 point
  3. Shark007

    Tester needed ^^

    To followup further, UEZ did some testing with files I provided. The conclussion was that my personally modified AU3Wrapper was causing the issue with the newest _WinAPI_DPI.au3 provided by UEZ.
    1 point
  4. Sorry I didn't comment this \G magic The definition of \G in the helpfile is not very clear, better look at this one , especially "\G matches at the end of the previous match" The conditions in the title question 'start matching after "String1" and stop matching after "String2" ' are defined in both parts of the alternation StringRegExp($txt, '(?sx) (?: ^.*?Writers | \G (?!</a>\s+</li>) ) .*?/nm\d+">([^<]*)', 3) How it works : - using the left part of the alternation and the final pattern, the regex runs up to 'Writers', searches and finds "Kirsten" - then using the right part of the alternation, \G matches right after "Kirsten", the assertion is true so the regex restarts searching and finds "Jessica" - \G matches right after "Jessica", in the same way the regex keeps on searching and finds "Maya" - \G matches right after "Maya", but at this position the condition is not fulfilled any more, the regex fails and returns the result
    1 point
  5. Does it work when you change the regex from: irec:match('^%s-([^%s]*)%s+([^%s+]*%s?[aApP]?[mM]?)%s+([^%s]*)%s+(.*%.au3)') to irec:match('^%s-(.-)%s*(%d%d:%d%d*%s?[aApP]?[mM]?)%s+([^%s]*)%s+(.*%.au3)') on the 3 places it exists?
    1 point
  6. Jos

    send a mail with Autoit

    Does your t-mobile account use 2 step authentication? If so does it also allow for "insecure apps" to set up another password, as that would then be required for this to work? Use that is that is available.
    1 point
  7. Andreik

    send a mail with Autoit

    You can use this UDF.
    1 point
  8. Trong

    AutoIt Snippets

    The replacement function for DirMove() Func _DirMove($SourceDir, $DestDir, $flag = 0) Local $Show_Debug = 1, $SourceDir_Exists = FileExists($SourceDir) If $Show_Debug Then ConsoleWrite("> Move folder '" & $SourceDir & "' [To> '" & $DestDir & "'" & @CRLF) If ($SourceDir_Exists < 1) Then If $Show_Debug Then ConsoleWrite("! ERROR - The source directory does not exist at: " & $SourceDir & @CRLF) Return SetError(1, -1, 0) EndIf Local $file_Move = '', $file_Moved = 0, $Move_Error = 0 $SourceDir = StringReplace($SourceDir, "/", '\') $DestDir = StringReplace($DestDir, "/", '\') If StringRight($SourceDir, 1) == '\' Then $SourceDir = StringTrimRight($SourceDir, 1) If StringRight($DestDir, 1) == '\' Then $DestDir = StringTrimRight($DestDir, 1) If Not FileExists($DestDir) Then If $Show_Debug Then ConsoleWrite("> Found folder: " & $SourceDir & @CRLF) If $Show_Debug Then ConsoleWrite("> Moving to: " & $DestDir & " (with Flag=" & $flag & ")" & @CRLF) DirCopy($SourceDir, $DestDir, $flag) Else If $Show_Debug Then ConsoleWrite("- Getting a list of files... " & @CRLF) Local $aFileList = _FileListToArrayRec($SourceDir & "\", "*", 1, 1, 1, 1) If (@error < 1) And IsArray($aFileList) Then If $Show_Debug Then ConsoleWrite("> Found files in: " & $SourceDir & @CRLF) If $Show_Debug Then ConsoleWrite("> Moving to: " & $DestDir & " (with Flag=" & $flag & ")" & @CRLF) For $I = 1 To $aFileList[0] $file_Move = $SourceDir & "\" & $aFileList[$I] $SourceDir_Exists = FileExists($file_Move) $file_Moved = FileMove($file_Move, $DestDir & "\" & $aFileList[$I], $flag < 1 ? 0 : 1 + 8) $Move_Error = @error If $Show_Debug Then ConsoleWrite("- Move file: " & $file_Move & " [" & $SourceDir_Exists & "] To> " & $DestDir & "\" & $aFileList[$I] & " [" & FileExists($DestDir & "\" & $aFileList[$I]) & "] > [Moved:" & $file_Moved & "-E:" & $Move_Error & "] " & (FileExists($file_Move) ? "Error" : "OK") & @CRLF) $file_Move = '' $SourceDir_Exists = 0 $file_Moved = 0 Next Else If $Show_Debug Then ConsoleWrite("! No files found at: " & $SourceDir & @CRLF) EndIf EndIf If $Show_Debug Then If FileExists($DestDir) Then ConsoleWrite("> Copied " & $SourceDir & " [To> " & $DestDir & @CRLF) EndIf If $Show_Debug Then ConsoleWrite("- Removing the source folder: " & $SourceDir & @CRLF) If FileExists($SourceDir) Then DirRemove($SourceDir, $flag) If FileExists($SourceDir) Then FileSetAttrib($SourceDir, "-RASH", $flag) DirRemove($SourceDir) If FileExists($SourceDir) And $flag Then RunWait(@ComSpec & ' /c takeown /f "' & $SourceDir & '" /r /d y', '', @SW_HIDE) RunWait(@ComSpec & ' /c Echo y|icacls "' & $SourceDir & '" /grant EveryOne:F /t /q', '', @SW_HIDE) RunWait(@ComSpec & ' /c RD /s /q "' & $SourceDir & '"', '', @SW_HIDE) DirRemove($SourceDir) EndIf EndIf EndIf If FileExists($SourceDir) Then If $Show_Debug Then ConsoleWrite("! FAILURE ! Folder " & $SourceDir & " has not been moved to: " & $DestDir & @CRLF) Return SetError(1, 0, 0) Else If $Show_Debug Then ConsoleWrite("+ SUCCESS ! Folder " & $SourceDir & " has been moved to: " & $DestDir & @CRLF) Return SetError(0, 0, 1) EndIf EndFunc ;==>_DirMove
    1 point
×
×
  • Create New...