Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#1623 closed Bug (Fixed)

_WinAPI_SetLayeredWindowAttributes() uses Execute() unnecessarily

Reported by: PsaltyDS Owned by: J-Paul Mesnage
Milestone: 3.3.7.0 Component: Standard UDFs
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

Ref: http://www.autoitscript.com/forum/index.php?showtopic=114398

In the WinAPI.au3 UDF, _WinAPI_SetLayeredWindowAttributes() makes unnecessary use of the Execute() function, causing it to throw errors from Obfuscator. This change looks to be functionally equivalent, but doesn't use Execute():

    If Not $isColorRef Then
        ; $i_transcolor = Hex(String($i_transcolor), 6)
        ; $i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2))
        $i_transcolor = Binary("0x00" & Hex(String($i_transcolor), 6))
        $i_transcolor = Int(BinaryMid($i_transcolor, 2, 1) & BinaryMid($i_transcolor, 3, 1) & BinaryMid($i_transcolor, 4, 1))   
    EndIf

Attachments (0)

Change History (4)

comment:1 by J-Paul Mesnage, 16 years ago

Milestone: 3.3.7.0
Owner: changed from Gary to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed by revision [5816] in version: 3.3.7.0

comment:2 by anonymous, 16 years ago

I hope the line :
$i_transcolor = Int(BinaryMid($i_transcolor, 2, 1) & BinaryMid($i_transcolor, 3, 1) & BinaryMid($i_transcolor, 4, 1))

got changed to :
$i_transcolor = Int(BinaryMid($i_transcolor, 2, 3))

comment:3 by J-Paul Mesnage, 16 years ago

In fact no but the working solution is not the suggested one but

$i_transcolor = Int(BinaryMid($i_transcolor, 3, 1) & BinaryMid($i_transcolor, 2, 1) & BinaryMid($i_transcolor, 1, 1))

without

        $i_transcolor = Binary("0x00" & Hex(String($i_transcolor), 6))

I should have test it more carefully ...

comment:4 by J-Paul Mesnage, 16 years ago

This ticket is referenced in revision: [5929]

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.