Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (88 - 90 of 3866)

Ticket Resolution Summary Owner Reporter
#3859 Rejected Extend For…Next syntax to force loop variable to be local within the loop only Alecsis1
Description

Something like this:

Opt('MustDeclareVars', 1)
For Local $i = 1 To 3
  ConsoleWrite($i) ; prints "123"
Next
ConsoleWrite($i)   ; now prints "4", but with "Local" modifier should be treated as "undeclared variable"

Imho, such syntax extension may be useful.

#3856 No Bug FileOpenDialog passing unseen information anonymous
Description

The summary is the best I could describe it and is an assumption. See link starting at post 4 https://www.autoitscript.com/forum/topic/207124-regexp-assistance-please/ for a better perspective.

Passing a file list to an array from the fileopendialog function puts something in the array that is messing with regexp functions. If I pass the same exact information from a "manually built array" of information the regexp will work with no issue.

$FileSelect = FileOpenDialog("File Rename", "F:\", "Images (*.jpg)|Videos (*.mp4)", $FD_MULTISELECT, "", $hForm)

$aDirContent_New = StringSplit($FileSelect, "|", 2)

_ArrayDisplay($aDirContent_New)

    For $i = UBound($aDirContent_New) - 1 To 0 Step - 1
        ConsoleWrite($i & " " & $aDirContent_New[$i] & @CRLF)
        If StringRegExp($aDirContent_New[$i], "^\d{4}(-\d{2}){2}_\d{6}_[PV]$") Then
            ConsoleWrite("> " & $i & @CRLF)
            _ArrayDelete($aDirContent_New, $i)
            ContinueLoop
        EndIf
        ;$aDirContent_New[$i] = $aDirContent_New[0] & "\" & $aDirContent_New[$i]
    Next
    
_ArrayDisplay($aDirContent_New)
{{{


As I said, passing an array directly, or the following code works perfectly with regexp which leads me to believe this is a bug.



{{{
#include <File.au3>
#include <WinAPISysWin.au3>
Global $GText
Local $hTimerProc = DllCallbackRegister('_TimerProc', 'none', 'hwnd;uint;uint_ptr;dword')
Global $g_iCount = 0
Local $iTimerID = _WinAPI_SetTimer(0, 0, 1000, DllCallbackGetPtr($hTimerProc))
$title = "File Rename"
$sFileSelect = FileOpenDialog($title, "F:\", "Images (*.jpg)|Videos (*.mp4)", $FD_MULTISELECT, "", 0)
$aDirContent_New = StringSplit($GText, """", 2)
_ArrayDisplay($aDirContent_New)

    For $i = UBound($aDirContent_New) - 1 To 0 Step - 1
        ConsoleWrite($i & " " & $aDirContent_New[$i] & @CRLF)
        If StringRegExp($aDirContent_New[$i], "^\d{4}(-\d{2}){2}_\d{6}_[PV]$") Or $aDirContent_New[$i] = " " Then
            ConsoleWrite("> " & $i & @CRLF)
            _ArrayDelete($aDirContent_New, $i)
            ContinueLoop
        EndIf
        ;$aDirContent_New[$i] = $aDirContent_New[0] & "\" & $aDirContent_New[$i]
    Next

_ArrayDisplay($aDirContent_New)
Func _TimerProc($hWnd, $iMsg, $iTimerID, $iTime)
$GText = ControlGetText($title, "", "Edit1")
EndFunc   ;==>_TimerProc
}}}
}}}
#3855 No Bug _ArrayToString for 1D array, for used in the Combo Box anonymous
Description

Original from Include Array.au3 Func _ArrayToString(Const ByRef $aArray, $sDelim_Col = "|", $iStart_Row = -1, $iEnd_Row = -1, $sDelim_Row = @CRLF, $iStart_Col = -1, $iEnd_Col = -1)

If using for Combo Box with 1D Array,

$Array = [1,2,3,4,5] GUICtrlSetData($Combo1, _ArrayToString($Array))

MsgBox(0,"",_ArrayToString($Array))

the String result will be

1 2 3 4 5

instead of 1|2|3|4|5

But if exchange the Delimiter the result will be ok

Func _ArrayToString(Const ByRef $aArray, $sDelim_Row = "|", $iStart_Row = -1, $iEnd_Row = -1, $sDelim_Col = @CRLF, $iStart_Col = -1, $iEnd_Col = -1)

Thank You

Note: See TracQuery for help on using queries.