#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 , 16 years ago
| Milestone: | → 3.3.7.0 |
|---|---|
| Owner: | changed from to |
| Resolution: | → Fixed |
| Status: | new → closed |
comment:2 by , 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 , 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 ...

Fixed by revision [5816] in version: 3.3.7.0