Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (163 - 165 of 3866)

Ticket Resolution Summary Owner Reporter
#2992 No Bug Int, Dec, Number return incorrect results when used with binary and string data timsky
Description

Forum bug report: http://www.autoitscript.com/forum/topic/167633-int-returns-incorrect-results

1) Int and Number of binary data works fine on 1-byte data only. 2+ byte binary data always returns incorrect results. 2) Case of 4-byte (32 bit) binary data and it's string representation:

a) Int and Number of 4-byte binary data returns wrong result. b) Int (64 bit flag) of string representation of 4-byte binary data returns 32-bit signed integer. Example string "0xffd88d8a" return -2585206 instead of 4292382090. c) Only Dec (64 bit flag) and Number (double flag) return correct results.

3) Number (double flag) does not work on binary data always. It returns 0. 4) Number (double flag) stop working on string data starting 5+ byte data. It returns 0. 5) Dec (double flag) doesn't work always. It returns strange numbers like 1.25986739689518e-321 for "0xff".

Demo code:

Global $aBin[] = ["0xff", '0xffd8', '0xffd88d', '0xffd88d8a', '0xffd88d8abc', '0xffd88d8abcd1', '0xffd88d8abcd1e5', '0xffd88d8abcd1e5ff']

For $i = 0 To UBound($aBin) - 1
    $real_str = $aBin[$i]
    $real_bin = Binary($real_str)
    ; MsgBox(0, VarGetType($real_str), VarGetType($real_bin))

    $sData = 'Hex: ' & @TAB & @TAB & $real_str & @LF & _
            'Binary: ' & @TAB & @TAB & StringLower($real_bin) & @LF & _
            'Dec32: ' & @TAB & @TAB & Dec(StringTrimLeft($real_str, 2), 1) & @LF & _	; added
            'Dec:  (auto)' & @TAB & @TAB & Dec(StringTrimLeft($real_str, 2)) & @LF & _	; Renamed
            'Dec64: ' & @TAB & @TAB & Dec(StringTrimLeft($real_str, 2), 2) & @LF & _	; added
            'Dec (double): ' & @TAB & @TAB & Dec(StringTrimLeft($real_str, 2), 3) & @LF & _	; added
            'Number32 <- String: ' & @TAB & @TAB & Number($real_str, 1) & @LF & _	; added
            'Number <- String:  (auto)' & @TAB & @TAB & Number($real_str) & @LF & _	; added
            'Number64 <- String: ' & @TAB & @TAB & Number($real_str, 2) & @LF & _	; added
            'Number (double) <- String: ' & @TAB & @TAB & Number($real_str, 3) & @LF & _	; added
            'Number32 <- Binary ' & @TAB & @TAB & Number($real_bin, 1) & @LF & _	; added
            'Number <- Binary  (auto)' & @TAB & @TAB & Number($real_bin) & @LF & _	; added
            'Number64 <- Binary ' & @TAB & @TAB & Number($real_bin, 2) & @LF & _	; added
            'Number (double) <- Binary ' & @TAB & @TAB & Number($real_bin, 3) & @LF & _	; added
            'Int32: ' & @TAB & @TAB & Int($real_str, 1) & @LF & _
            'Int (auto): ' & @TAB & @TAB & Int($real_str) & @LF & _
            'Int64: ' & @TAB & @TAB & Int($real_str, 2) & @LF & _
            'Int32 <- String: ' & @TAB & Int(String($real_str), 1) & @LF & _
            'Int (auto) <- String: ' & @TAB & Int(String($real_str)) & @LF & _
            'Int64 <- String: ' & @TAB & Int(String($real_str), 2) & @LF & _
            'Int32 <- Binary: ' & @TAB & Int($real_bin, 1) & @LF & _
            'Int (auto) <- Binary: ' & @TAB & Int($real_bin) & @LF & _
            'Int64 <- Binary: ' & @TAB & Int($real_bin, 2)

    MsgBox(524288, $real_str & " - " & BinaryLen($real_str) & ' bytes', $sData)

Next

So right now the only working way to interpret Binary data in 8-64 bit range is Dec with 64 bit flag set. And bugfix for 3.3.12.0 "Fixed #2581: Dec() wasn't working correctly for flags 0, 1, 2" seems like is not fully completed.

AutoIt 3.3.12.0 / 3.3.13.19. x86 and x64 OS: Win 7 x64 SP1

#3703 Wont Fix 2 ^ 49 and further return wrong results timsky
Description

Bug starts at 2 49 and further. Sample code:

$iInt64 = Int(2 ^ 49, 1)
ConsoleWrite($iInt64 & @lf)
562949953421313
#3168 Duplicate Missing constants from AutoItConstants.au3 timrude@…
Description

In the help topic for the GetWinState function, it lists the various return values. Immediately below that list it says Constants are defined in "AutoItConstants.au3".

However, the various '$WIN_STATE_...' constants are NOT defined in the AutoItConstants.au3 file, but really should be as follows:

; GetWinState Constants
Global Const $WIN_STATE_EXISTS = 1 ; Window exists
Global Const $WIN_STATE_VISIBLE = 2 ; Window is visible
Global Const $WIN_STATE_ENABLED = 4 ; Window is enabled
Global Const $WIN_STATE_ACTIVE = 8 ; Window is active
Global Const $WIN_STATE_MINIMIZED = 16 ; Window is minimized
Global Const $WIN_STATE_MAXIMIZED = 32 ; Window is maximized
Note: See TracQuery for help on using queries.