Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1623 closed Bug (Fixed)

_WinAPI_SetLayeredWindowAttributes() uses Execute() unnecessarily

Reported by: PsaltyDS Owned by: Jpm
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 Changed 14 years ago by Jpm

  • Milestone set to 3.3.7.0
  • Owner changed from Gary to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [5816] in version: 3.3.7.0

comment:2 Changed 14 years ago by anonymous

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 Changed 14 years ago by Jpm

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 Changed 14 years ago by Jpm

This ticket is referenced in revision: [5929]

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

Action
as closed The owner will remain Jpm.
Author


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

 
Note: See TracTickets for help on using tickets.