Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (76 - 78 of 3866)

Ticket Resolution Summary Owner Reporter
#3871 Fixed _ArrayDisplay() Hang sorted array with Null element Jon Jpm
Description

To repro just use the pointed link

https://www.autoitscript.com/forum/topic/207689-bug-with-_arraydisplay-in-33160/?tab=comments#comment-1498041

#3870 Fixed [Bug in Regexptitle & regexpclass] anonymous
Description

in version v3.3.15.4(beta):->the script work fine but,in version v3.3.16.0 -> script not work below script:

#include <WinAPIGdi.au3>
#include <WinAPIIcons.au3>
#include <WinAPIRes.au3>
#include <WinAPISys.au3>
#include <WinAPISysWin.au3>
#include <WindowsConstants.au3>
#include <array.au3>
Global $g_bExit = False

_Example()
Func _Example()
    Local Const $sClass = 'WindowsForms10.Window.8.app.0.21373f6_r14_ad1'
    Local Const $sName = 'NCRE服务器设置'

    ; Get module handle for the current process
    Local $hInstance = _WinAPI_GetModuleHandle(0)

    ; Create a class cursor
    Local $hCursor = _WinAPI_LoadCursor(0, 32512) ; IDC_ARROW

    ; Create a class icons (large and small)
    Local $tIcons = DllStructCreate('ptr;ptr')
    _WinAPI_ExtractIconEx(@SystemDir & '\shell32.dll', 130, DllStructGetPtr($tIcons, 1), DllStructGetPtr($tIcons, 2), 1)
    Local $hIcon = DllStructGetData($tIcons, 1)
    Local $hIconSm = DllStructGetData($tIcons, 2)

    ; Create DLL callback function (window procedure)
    Local $hProc = DllCallbackRegister('_WndProc', 'lresult', 'hwnd;uint;wparam;lparam')

    ; Create and fill $tagWNDCLASSEX structure
    Local $tWCEX = DllStructCreate($tagWNDCLASSEX & ';wchar szClassName[' & (StringLen($sClass) + 1) & ']')
    DllStructSetData($tWCEX, 'Size', DllStructGetPtr($tWCEX, 'szClassName') - DllStructGetPtr($tWCEX))
    DllStructSetData($tWCEX, 'Style', 0)
    DllStructSetData($tWCEX, 'hWndProc', DllCallbackGetPtr($hProc))
    DllStructSetData($tWCEX, 'ClsExtra', 0)
    DllStructSetData($tWCEX, 'WndExtra', 0)
    DllStructSetData($tWCEX, 'hInstance', $hInstance)
    DllStructSetData($tWCEX, 'hIcon', $hIcon)
    DllStructSetData($tWCEX, 'hCursor', $hCursor)
    DllStructSetData($tWCEX, 'hBackground', _WinAPI_CreateSolidBrush(_WinAPI_GetSysColor($COLOR_3DFACE)))
    DllStructSetData($tWCEX, 'MenuName', 0)
    DllStructSetData($tWCEX, 'ClassName', DllStructGetPtr($tWCEX, 'szClassName'))
    DllStructSetData($tWCEX, 'hIconSm', $hIconSm)
    DllStructSetData($tWCEX, 'szClassName', $sClass)

    ; Register a window class
    _WinAPI_RegisterClassEx($tWCEX)

    ; Create a window
    _WinAPI_CreateWindowEx(0, $sClass, $sName, BitOR($WS_CAPTION, $WS_POPUPWINDOW, $WS_VISIBLE), (@DesktopWidth - 400) / 2, (@DesktopHeight - 400) / 2, 400, 400, 0)
    _ArrayDisplay(WinList("[TITLE:NCRE服务器设置]")) ; 1 window
    _ArrayDisplay(WinList("[REGEXPTITLE:NCRE服务器设置]")) ; 0 window, why ?
    _ArrayDisplay(WinList("[REGEXPTITLE:服务器设置]")) ; 1 window
    _ArrayDisplay(WinList("[REGEXPTITLE:NCRE]")) ; 0 windows, why ?


    _ArrayDisplay(WinList("[CLASS:WindowsForms10.Window.8.app.0.21373f6_r14_ad1]"))    ; 1 window
    _ArrayDisplay(WinList("[REGEXPCLASS:WindowsForms10.Window.8.app.0.21373f6_r14_ad1]")) ; 0 window, why ?
    _ArrayDisplay(WinList("[REGEXPCLASS:WindowsForms10]")) ; 0 window, why ?
    While 1
        Sleep(100)
        If $g_bExit Then
            ExitLoop
        EndIf
    WEnd

    ; Unregister window class and release unnecessary resources
    _WinAPI_UnregisterClass($sClass, $hInstance)
    _WinAPI_DestroyCursor($hCursor)
    _WinAPI_DestroyIcon($hIcon)
    _WinAPI_DestroyIcon($hIconSm)

    DllCallbackFree($hProc)

EndFunc   ;==>_Example

; Func _WinAPI_DefWindowProcW($hWnd, $iMsg, $wParam, $lParam)
; Local $aRet = DllCall('user32.dll', 'lresult', 'DefWindowProcW', 'hwnd', $hWnd, 'uint', $iMsg, 'wparam', $wParam, 'lparam', $lParam)

; If @error Then
; Return SetError(1, 0, 0)
; EndIf
; Return $aRet[0]
; EndFunc   ;==>_WinAPI_DefWindowProcW

Func _WndProc($hWnd, $iMsg, $wParam, $lParam)
    Switch $iMsg
        Case $WM_CLOSE
            $g_bExit = True
    EndSwitch
    Return _WinAPI_DefWindowProcW($hWnd, $iMsg, $wParam, $lParam)
EndFunc   ;==>_WndProc
#3869 Fixed Subtraction operator before power operation is parsed incorrectly Jon AspirinJunkie
Description

For the operation of the basic form a - b^e, the result depends on the data type of the base b and the parity of the exponent e.

The following test script:

Global $sString = ""

$x = 2

$y = 4
$sString = StringFormat("% 15s = %d\n", "11 - 2 ^ 4", 11 - 2 ^ 4) & _
    StringFormat("% 15s = %d\n", "11 - 2.0 ^ 4", 11 - 2.0 ^ 4) & _
        StringFormat("% 15s = %d\n", "11 - 2e0 ^ 4", 11 - 2e0 ^ 4) & _
        StringFormat("% 15s = %d\n", "11 - '2' ^ 4", 11 - '2' ^ 4) & _
        StringFormat("% 15s = %d\n", "11 - $x ^ 4", 11 - $x ^ 4) & _
        StringFormat("% 15s = %d\n", "11 - (2 ^ 4)", 11 - (2 ^ 4)) & _
        StringFormat("% 15s = %d\n", "11 - - 2 ^ 4", 11 - - 2 ^ 4) & _
        StringFormat("% 15s = %d\n\n", "11 - 2 ^ $y", 11 - 2 ^ $y) 

$y = 3
$sString &= StringFormat("% 15s = %d\n", "11 - 2 ^ 3", 11 - 2 ^ 3) & _
    StringFormat("% 15s = %d\n", "11 - 2.0 ^ 3", 11 - 2.0 ^ 3) & _
        StringFormat("% 15s = %d\n", "11 - 2e0 ^ 3", 11 - 2e0 ^ 3) & _
        StringFormat("% 15s = %d\n", "11 - '2' ^ 3", 11 - '2' ^ 3) & _
        StringFormat("% 15s = %d\n", "11 - $x ^ 3", 11 - $x ^ 3) & _
        StringFormat("% 15s = %d\n", "11 - (2 ^ 3)", (11 - 2 ^ 3)) & _
        StringFormat("% 15s = %d\n", "11 - - 2 ^ 3", 11 - 2 ^ 3) & _
        StringFormat("% 15s = %d\n\n", "11 - 2 ^ $y", 11 - 2 ^ $y) 

ConsoleWrite($sString)

produces under 3.3.16.0:

     11 - 2 ^ 4 = 27
   11 - 2.0 ^ 4 = 27
   11 - 2e0 ^ 4 = 27
   11 - '2' ^ 4 = -5
    11 - $x ^ 4 = -5
   11 - (2 ^ 4) = -5
   11 - - 2 ^ 4 = -5
    11 - 2 ^ $y = 27

     11 - 2 ^ 3 = 3
   11 - 2.0 ^ 3 = 3
   11 - 2e0 ^ 3 = 3
   11 - '2' ^ 3 = 3
    11 - $x ^ 3 = 3
   11 - (2 ^ 3) = 3
   11 - - 2 ^ 3 = 3
    11 - 2 ^ $y = 3

and under 3.3.14.5:

  11 - 2 ^ 4 = 27
11 - 2.0 ^ 4 = -5
11 - 2e0 ^ 4 = -5
11 - '2' ^ 4 = -5
 11 - $x ^ 4 = -5
11 - (2 ^ 4) = -5
11 - - 2 ^ 4 = -5
 11 - 2 ^ $y = 27

  11 - 2 ^ 3 = 3
11 - 2.0 ^ 3 = 3
11 - 2e0 ^ 3 = 3
11 - '2' ^ 3 = 3
 11 - $x ^ 3 = 3
11 - (2 ^ 3) = 3
11 - - 2 ^ 3 = 3
 11 - 2 ^ $y = 3

Two possible explanations for this behaviour:

  1. binary minus is misinterpreted as unary minus:
    • The minus has two functions - once as a binary minus operator and once as a unary sign operator.
    • The tricky thing about this is that the binary operator has a lower priority than the power operator.
    • The sign operator, on the other hand, has a higher priority (in contrast to mathematics) than the power operator.
    • This leads to the implicit execution (-2)^4
    • The basic problem here, however, is that even if the minus here is only interpreted as a sign operator, we still lack a binary operator that links the right side with the 11. The parser seems to assume a plus operator for this.
    • Furthermore, there is no indication in the AutoIt documentation so far that the sign operator has a higher valence than the power operator.
  1. the minus is executed twice:
    • the --Operator seem to be executed twice - once as a unary operator (sign) and once as a binary operator (the minus operation).
    • This leads to the implicit calculation 11 - (-(2^4))
Note: See TracQuery for help on using queries.