Opened 12 years ago

Closed 11 years ago

#2105 closed Bug (Fixed)

Odd behavior Hex()

Reported by: anonymous Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


AutoIt XP SP3

I have recompiled a script using latest AutoIt version.
Some Hex() calls are behaving differently.
Eg Using Hex after reading value from RegRead()
Using Hex after reading value from DLLCall()

Small example below.


$DecimalNumber = 1862402120
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3","deleteme") ; clean start
ConsoleWrite("$DecimalNumber >" & $DecimalNumber & "<" & @LF)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3","deleteme","REG_DWORD",$DecimalNumber)
$fromRegistry = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3","deleteme")
; returns number as a decimal number
ConsoleWrite("$fromRegistry >" & $fromRegistry & "<" & @LF)
If $DecimalNumber = $fromRegistry Then

ConsoleWrite($DecimalNumber & " = " & $fromRegistry & @LF)


ConsoleWrite($DecimalNumber & " <> " & $fromRegistry & @LF)

; now do some HEX functions on it
ConsoleWrite("Hex($DecimalNumber) >" & Hex($DecimalNumber) & "<" & @LF)
ConsoleWrite("Hex($fromRegistry) >" & Hex($fromRegistry) & "<" & @LF)

Attachments (0)

Change History (4)

comment:1 Changed 12 years ago by anonymous

Results from sample script
$DecimalNumber >1862402120<
$fromRegistry >1862402120<
1862402120 = 1862402120
Hex($DecimalNumber) >6F020048<
Hex($fromRegistry) >41DBC08012000000<

comment:2 Changed 12 years ago by Valik

  • Resolution set to No Bug
  • Status changed from new to closed

You want the forum, not the issue tracker.

comment:3 Changed 11 years ago by Jpm

  • Resolution No Bug deleted
  • Status changed from closed to reopened

In fact the problem come from regread with REG_DWORD type

comment:4 Changed 11 years ago by Jon

  • Milestone set to
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from reopened to closed

Fixed by revision [8990] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jon.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.