Jump to content

Script becomes way slower after a msgbox - (Moved)


Recommended Posts

Tested on large script with large GUI.  No impact.  It seems that only OnEventMode has some impacts and are cumulative (which make total sense).  So here my last tests :

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Constants.au3>

$start = TimerInit()
$x = 0
For $i = 1 To 5000000
    $x += 1
Next
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : TimerDiff($start) = ' & TimerDiff($start) & @CRLF)

MsgBox ($MB_SYSTEMMODAL,"","Test")  ; This has no impact
$inp = InputBox ("Test","Test",1) ; This has no impact
Opt('GUIOnEventMode', 1) ; <<<<<<<<<<<<  This has impact
Opt('TrayOnEventMode', 1) ; <<<<<<<<<<<<  This has impact
GUICreate ("Test")  ; This has no impact
GUISetState ()  ; This has no impact
For $i = 1 to 100  ; This has no impact
  GUIGetMsg (1)
Next
Sleep (1000)  ; This has no impact

$start = TimerInit()
$x = 0
For $i = 1 To 5000000
    $x += 1
Next
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : TimerDiff($start) = ' & TimerDiff($start) & @CRLF)

x64 :

@@ Debug(11) : TimerDiff($start) = 601.1838
@@ Debug(29) : TimerDiff($start) = 3002.9917

 

x86 :

@@ Debug(11) : TimerDiff($start) = 675.5933
@@ Debug(29) : TimerDiff($start) = 3437.8902

 

ps.  Tested on Win7 - the impact is little less on Win7, but the impact is in the same scale.

 

Edited by Nine
Link to comment
Share on other sites

  • Moderators

Jon,

My results with your test script - x32:

Before:

@@ Debug(8) : TimerDiff($start) = 1094.8781
@@ Debug(16) : TimerDiff($start) = 9042.7294

After:

@@ Debug(8) : TimerDiff($start) = 978.6774
@@ Debug(16) : TimerDiff($start) = 901.0155

and x64:

Before:

@@ Debug(10) : TimerDiff($start) = 888.8622
@@ Debug(18) : TimerDiff($start) = 7785.1423

After:

@@ Debug(10) : TimerDiff($start) = 906.3616
@@ Debug(18) : TimerDiff($start) = 898.4123

AutoIt 3.3.14.5 MessageLoop mode with Win 10 Home 1909 Build 18363.778

Looks good to me.

M23

Edited by Melba23
Added OS details

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

with the release 3.14.5 it was

@ Debug(11) : TimerDiff($start) = 652.8435
@@ Debug(23) : TimerDiff($start) = 8112.1564
 

so big improvement

Under 1909 with the Jon Proposal x86

@@ Debug(11) : TimerDiff($start) = 624.6296
@@ Debug(23) : TimerDiff($start) = 1561.5517
 

PS test with the above Nine script

Link to comment
Share on other sites

On 4/5/2020 at 6:20 PM, argumentum said:

< based on this script>

test()
Func test()
    For $n = 0 To 1
        WinSetState(AutoItWinGetTitle(), "", @SW_HIDE)
        AutoItSetOption('GUIOnEventMode', $n)
        $x = 0
        $start = TimerInit()
        For $i = 1 To 500000
            $x += 1
        Next
        ConsoleWriteMsgBox('@@ Debug(' & @ScriptLineNumber & ') : TimerDiff($start) = ' & TimerDiff($start) & @TAB & ' GUIOnEventMode = ' & $n & @CRLF) ;### Debug Console
        ; Show the AutoIt3 hidden window
        WinSetState(AutoItWinGetTitle(), "", @SW_SHOW)
        $start = TimerInit()
        $x = 0
        For $i = 1 To 500000
            $x += 1
        Next
        ConsoleWriteMsgBox('@@ Debug(' & @ScriptLineNumber & ') : TimerDiff($start) = ' & TimerDiff($start) & @TAB & ' GUIOnEventMode = ' & $n & @CRLF) ;### Debug Console
    Next
    WinSetState(AutoItWinGetTitle(), "", @SW_HIDE)
EndFunc   ;==>test

ConsoleWriteMsgBox()
Func ConsoleWriteMsgBox($s = Default)
    Local Static $v = ""
    If $s = Default Then
        MsgBox(0, "Test - x64=" & @AutoItX64, $v, 60)
    Else
        $v &= $s
        ConsoleWrite($s)
    EndIf
EndFunc   ;==>ConsoleWriteMsgBox
;~  ---------------------------
;~  test_beta.au3 v3.3.14.5
;~  ---------------------------
;~  @@ Debug(12) : TimerDiff($start) = 145.6027  GUIOnEventMode = 0
;~  @@ Debug(20) : TimerDiff($start) = 1775.5734     GUIOnEventMode = 0
;~  @@ Debug(12) : TimerDiff($start) = 1967.2883     GUIOnEventMode = 1
;~  @@ Debug(20) : TimerDiff($start) = 1963.5744     GUIOnEventMode = 1

;~  ---------------------------
;~  test_beta.au3 v3.3.15.1
;~  ---------------------------
;~  @@ Debug(12) : TimerDiff($start) = 108.2709  GUIOnEventMode = 0
;~  @@ Debug(20) : TimerDiff($start) = 126.4575  GUIOnEventMode = 0
;~  @@ Debug(12) : TimerDiff($start) = 318.5004  GUIOnEventMode = 1
;~  @@ Debug(20) : TimerDiff($start) = 365.3123  GUIOnEventMode = 1

so I guess we're good

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

My results:

Autoit version: 3.3.15.0, x64: 0, OS: WIN_10 build 18362
@@ Debug(13) : TimerDiff($start) = 800.0872
@@ Debug(31) : TimerDiff($start) = 7599.4445

Autoit version: 3.3.15.1, x64: 0, OS: WIN_10 build 18362
@@ Debug(13) : TimerDiff($start) = 730.142
@@ Debug(31) : TimerDiff($start) = 3479.743

Autoit version: 3.3.15.0, x64: 1, OS: WIN_10 build 18362
@@ Debug(13) : TimerDiff($start) = 803.3272
@@ Debug(31) : TimerDiff($start) = 6431.3253

Autoit version: 3.3.15.1, x64: 1, OS: WIN_10 build 18362
@@ Debug(13) : TimerDiff($start) = 718.7511
@@ Debug(31) : TimerDiff($start) = 3341.6384

on Win10 1903.

For me it's still slow compared to the first value although the speed of execution has been doubled.

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

  • Administrators

Was getting confused reading these it seems that there are two things going on here. A slowdown in general with Win10 and PeekMessage. And another that is nothing to do with Win10 and just a general slowdown with OnEventModes?  I just had a look at the GuiOnEvent code and there is the allocation of a string structure each call which when I remove it seems to completely remove the delay so I'll look at fixing that.

Link to comment
Share on other sites

I still get same issue.

;Running Code:
;https://www.autoitscript.com/forum/topic/202270-script-becomes-way-slower-after-a-msgbox-moved/?do=findComment&comment=1454015

AutoItVersion: 3.3.14.5
Running Mode: X86
WIN_10  Version 1709 (OS Build 16299.15)
@@ Debug(15) : TimerDiff($start) = 624.791050045122
@@ Debug(33) : TimerDiff($start) = 3036.89471727756

AutoItVersion: 3.3.14.5
Running Mode: X64
WIN_10  Version 1709 (OS Build 16299.15)
@@ Debug(15) : TimerDiff($start) = 532.021945882254
@@ Debug(33) : TimerDiff($start) = 2390.98452542936


AutoItVersion: 3.3.15.1
Running Mode: X86
WIN_10  Version 1709 (OS Build 16299.15)
@@ Debug(15) : TimerDiff($start) = 559.438517863906
@@ Debug(33) : TimerDiff($start) = 2861.06961335783

AutoItVersion: 3.3.15.1
Running Mode: X64
WIN_10  Version 1709 (OS Build 16299.15)
@@ Debug(15) : TimerDiff($start) = 483.522469572211
@@ Debug(33) : TimerDiff($start) = 2386.48990961672

 

;Running Code:
;https://www.autoitscript.com/forum/topic/202270-script-becomes-way-slower-after-a-msgbox-moved/?do=findComment&comment=1454036

AutoItVersion: 3.3.14.5
Running Mode: X86
WIN_10  Version 1709 (OS Build 16299.15)
@@ Debug(15) : TimerDiff($start) = 108.172368808652  GUIOnEventMode = 0
@@ Debug(23) : TimerDiff($start) = 111.433741530951  GUIOnEventMode = 0
@@ Debug(15) : TimerDiff($start) = 235.999184072344  GUIOnEventMode = 1
@@ Debug(23) : TimerDiff($start) = 230.10358073008   GUIOnEventMode = 1


AutoItVersion: 3.3.14.5
Running Mode: X64
WIN_10  Version 1709 (OS Build 16299.15)
@@ Debug(15) : TimerDiff($start) = 98.9908447773616  GUIOnEventMode = 0
@@ Debug(23) : TimerDiff($start) = 112.353705807815  GUIOnEventMode = 0
@@ Debug(15) : TimerDiff($start) = 190.595673946892  GUIOnEventMode = 1
@@ Debug(23) : TimerDiff($start) = 179.082093076538  GUIOnEventMode = 1


AutoItVersion: 3.3.15.1
Running Mode: X86
WIN_10  Version 1709 (OS Build 16299.15)
@@ Debug(15) : TimerDiff($start) = 102.000016365311  GUIOnEventMode = 0
@@ Debug(23) : TimerDiff($start) = 113.813725352672  GUIOnEventMode = 0
@@ Debug(15) : TimerDiff($start) = 189.659636596576  GUIOnEventMode = 1
@@ Debug(23) : TimerDiff($start) = 216.071495368617  GUIOnEventMode = 1

AutoItVersion: 3.3.15.1
Running Mode: X64
WIN_10  Version 1709 (OS Build 16299.15)
@@ Debug(15) : TimerDiff($start) = 75.8955916527562  GUIOnEventMode = 0
@@ Debug(23) : TimerDiff($start) = 91.5636236539532  GUIOnEventMode = 0
@@ Debug(15) : TimerDiff($start) = 189.159910131063  GUIOnEventMode = 1
@@ Debug(23) : TimerDiff($start) = 174.688591507806  GUIOnEventMode = 1

 

 

Saludos

Link to comment
Share on other sites

  • Moderators

Jon,

Sorry if we have confused you. Here are my expanded results from this morning's tests:

Current AutoIt3 exes

MessageLoop mode

x32

@@ Debug(12) : TimerDiff($start) = 1136.8311
@@ Debug(20) : TimerDiff($start) = 8804.3466

x64

@@ Debug(12) : TimerDiff($start) = 1070.6723
@@ Debug(20) : TimerDiff($start) = 7253.9821

OnEvent mode

x32

@@ Debug(12) : TimerDiff($start) = 2769.3262
@@ Debug(20) : TimerDiff($start) = 10318.7869

x64

@@ Debug(12) : TimerDiff($start) = 2524.5994
@@ Debug(20) : TimerDiff($start) = 8722.3235

;###################################################

New AutoIt3 exes

MessageLoop mode

x32

@@ Debug(12) : TimerDiff($start) = 974.914
@@ Debug(20) : TimerDiff($start) = 908.6128

x64

@@ Debug(12) : TimerDiff($start) = 901.6026
@@ Debug(20) : TimerDiff($start) = 830.2084

OnEvent mode

x32

@@ Debug(12) : TimerDiff($start) = 2560.4501
@@ Debug(20) : TimerDiff($start) = 2492.5051

x64

@@ Debug(12) : TimerDiff($start) = 2630.1342
@@ Debug(20) : TimerDiff($start) = 2435.2599

Which in summary gives me the following:

- Your new exes run at about the same speed (or even a bit faster - which is to be expected) before and after any GUI display and seem to solve that problem.

- But OnEvent mode is over twice as slow as MessageLoop mode with both the current and your new exes before any GUI display - although not so bad afterwards.

So you are right - it looks as if there are 2 separate things happening here. Good luck with this morning's detective work!

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

Jon,

A comparison between yesterday's and today's exes - Win 10:

New AutoIt3 exes                    1 May       2 May

MessageLoop mode

x32

@@ Debug(12) : TimerDiff($start) =  974.914     966.0349
@@ Debug(20) : TimerDiff($start) =  908.6128    873.589

x64

@@ Debug(12) : TimerDiff($start) =  901.6026    826.4518
@@ Debug(20) : TimerDiff($start) =  830.2084    870.6708

OnEvent mode

x32

@@ Debug(12) : TimerDiff($start) =  2560.4501   1029.5415
@@ Debug(20) : TimerDiff($start) =  2492.5051   900.3705

x64

@@ Debug(12) : TimerDiff($start) =  2630.1342   1137.6319
@@ Debug(20) : TimerDiff($start) =  2435.2599   868.7885

So looking good for me.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

tried new exe - tests become faster, but scripts now hung consuming 100% of one CPU core...

 

#include <GuiListView.au3>
#include <FontConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
#include <GuiTreeView.au3>
#include <SQLite.au3>
#include <Math.au3>
#include <GDIPlus.au3>

$hDLL_Crypt32 = DllOpen("Crypt32.dll")
$hDLL_ntdll = DllOpen("ntdll.dll")

_GDIPlus_Startup()

Global Const $tagNMLVCACHEHINT = $tagNMHDR & ";int iFrom;int iTo"
Global $aListView, $hListView, $TreeView_SelTitle, $aTreeViewState[19][8] = [[18,"","","","","","",""]], $sSelectedTVIndex = 3
Global $hListView_ImageList

Opt("GUIOnEventMode", 1)

#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 881, 516, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
Global $hTreeView = _GUICtrlTreeView_Create($Form1, 8, 16, 319, 489, BitOR($GUI_SS_DEFAULT_TREEVIEW,$WS_HSCROLL,$WS_VSCROLL, $TVS_SHOWSELALWAYS,$WS_HSCROLL,$WS_BORDER, $TVS_INFOTIP) - $TVS_DISABLEDRAGDROP, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))

$TreeView_Root_1 = _GUICtrlTreeView_Add($hTreeView, 0, "Root - 1")
_GUICtrlTreeView_SetIcon($hTreeView, $TreeView_Root_1, "shell32.dll", 4)
$TreeView_Root_2 = _GUICtrlTreeView_Add($hTreeView, 0, "Root - 2")
_GUICtrlTreeView_SetIcon($hTreeView, $TreeView_Root_2, "shell32.dll", 4)
Global $idListView = GUICtrlCreateListView("Rowid|Name|Time|Category", 336, 16, 538, 486,  $LVS_SHOWSELALWAYS);,$LVS_SINGLESEL
_GUICtrlListView_SetExtendedListViewStyle( $idListView, BitOR($LVS_EX_DOUBLEBUFFER, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES, $WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))

GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 0)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 250)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 88)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 3, 112)
GUICtrlSetOnEvent(-1, "ListViewClick")

SetIconListToListView()


$hListView = GUICtrlGetHandle($idListView)
ConsoleWrite($hListView & @CRLF)
;------------------------------------------------------------------------------------------

  ; Get the font of the TreeView control
  ; Copied from the _GUICtrlGetFont example by KaFu
  ; See http://www.autoitscript.com/forum/index.php?showtopic=124526
  Local $hDC = _WinAPI_GetDC( $hTreeView )
  $hFont = _SendMessage( $hTreeView, $WM_GETFONT )
  Local $hObject = _WinAPI_SelectObject( $hDC, $hFont )
  Local $lvLOGFONT = DllStructCreate( $tagLOGFONT )
  DllCall( 'gdi32.dll', 'int', 'GetObjectW', 'ptr', $hFont, 'int', DllStructGetSize( $lvLOGFONT ), 'ptr', DllStructGetPtr( $lvLOGFONT ) )
  _WinAPI_SelectObject( $hDC, $hObject )
  _WinAPI_ReleaseDC( $hTreeView, $hDC )
  $TreeViewFont = _WinAPI_CreateFontIndirect( $lvLOGFONT )
  Local $iWeight = BitOR( DllStructGetData( $lvLOGFONT, "Weight" ), $FW_BOLD )
  DllStructSetData( $lvLOGFONT, "Weight", $iWeight )
  $TreeViewFontBold = _WinAPI_CreateFontIndirect( $lvLOGFONT )

;------------------------------------------------------------------------------------------
Local $idTVContextMenu = GUICtrlCreateContextMenu(GUICtrlCreateDummy())
$hTVContextMenu = GUICtrlGetHandle($idTVContextMenu)
Local $idTVContextMenu_Refresh = GUICtrlCreateMenuItem("Refresh", $idTVContextMenu)
Local $idTVContextMenu_Rename = GUICtrlCreateMenuItem("Rename", $idTVContextMenu)
GUICtrlCreateMenuItem("", $idTVContextMenu) ; separator
Local $idTVContextMenu_MarkALLRead = GUICtrlCreateMenuItem("Mark ALL Items Read", $idTVContextMenu)
Local $idTVContextMenu_MarkALLUnRead = GUICtrlCreateMenuItem("Mark ALL Items UnRead", $idTVContextMenu)
;------------------------------------------------------------------------------------------


GUIRegisterMsg($WM_NOTIFY, "LWS_WM_NOTIFY")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
SubFunction_FillTreeView()

While 1
    Sleep(100)
WEnd

Func Form1Close()
    GUIRegisterMsg( $WM_NOTIFY, "" )
    ;
    DllClose($hDLL_Crypt32)
    DllClose($hDLL_ntdll)
    _GDIPlus_Shutdown()
    Exit
EndFunc
;==========================================================================================
Func ListViewClick()

EndFunc
;==========================================================================================
Func TreeView1Click()
    Local $sQuery, $aResult, $iRows, $iColumns
    Static Local $TreeView_SelTitlePRE = ""

    If $TreeView_SelTitlePRE == "" Then
        $TreeView_Selected = _GUICtrlTreeView_GetFirstChild($hTreeView, $TreeView_Root_1)
        _GUICtrlTreeView_ClickItem($hTreeView, $TreeView_Selected, "left")
    Else
        $TreeView_Selected = _GUICtrlTreeView_GetSelection($hTreeView)
    EndIf
    $TreeView_SelTitle = _GUICtrlTreeView_GetText($hTreeView, $TreeView_Selected)
    If $TreeView_SelTitle == $TreeView_SelTitlePRE Then
        Return
    Else
        $TreeView_SelTitlePRE = $TreeView_SelTitle
    EndIf

    ConsoleWrite($TreeView_SelTitle & @CRLF)

EndFunc
;==========================================================================================
Func SubFunction_FillTreeView()

    ConsoleWrite(" > $sSelected TV Index = " & $sSelectedTVIndex & @CRLF)
    ConsoleWrite(" > $sSelected TV Name = " & $aTreeViewState[$sSelectedTVIndex][5] & @CRLF)

    Local $idTVItem[$aTreeViewState[0][0]+1] = [$aTreeViewState[0][0]]
    _GUICtrlTreeView_BeginUpdate($hTreeView)
    _GUICtrlTreeView_DeleteChildren($hTreeView, $TreeView_Root_1)
    _GUICtrlTreeView_DeleteChildren($hTreeView, $TreeView_Root_2)
    _GUICtrlTreeView_SetTextColor($hTreeView, 0x77B5FE) ; color of additional text
    For $i = 1 To $aTreeViewState[0][0]
        $aTreeViewState[$i][0] = 3 ; icon num in "shell32.dll"
        $aTreeViewState[$i][1] = 0x000000 ; item text color
        $aTreeViewState[$i][2] = 0 ; text is bold (or not)
        $aTreeViewState[$i][3] = "some info" ; some additional text
        $aTreeViewState[$i][5] = String("item " & $i); item name
        Switch Mod($i,2)
            Case 0
                $idTVItem[$i] = _GUICtrlTreeView_AddChild($hTreeView,$TreeView_Root_2, $aTreeViewState[$i][5])
            Case Else
                $idTVItem[$i] = _GUICtrlTreeView_AddChild($hTreeView,$TreeView_Root_1, $aTreeViewState[$i][5])
        EndSwitch
        Switch Mod($i,3)
            Case 0
                $aTreeViewState[$i][2] = 0
            Case Else
                $aTreeViewState[$i][2] = 1
        EndSwitch
        _GUICtrlTreeView_SetItemParam($hTreeView, $idTVItem[$i], $i)
        _GUICtrlTreeView_SetIcon($hTreeView, $idTVItem[$i], "shell32.dll", $aTreeViewState[$i][0])
    Next
    _GUICtrlTreeView_Expand($hTreeView, $TreeView_Root_1, True)
    _GUICtrlTreeView_EndUpdate($hTreeView)

    _GUICtrlTreeView_ClickItem($hTreeView, $idTVItem[$sSelectedTVIndex])

    SubFunction_FillListView()

EndFunc
;==========================================================================================
Func SubFunction_FillListView_Delayed()
    AdlibUnRegister("SubFunction_FillListView_Delayed")
    SubFunction_FillListView()
EndFunc
;==========================================================================================
Func SubFunction_FillListView()

    _GUICtrlListView_BeginUpdate ($idListView)
    _GUICtrlListView_DeleteAllItems ($idListView)
    For $i = 0 To 63
        $ret = _GUICtrlListView_AddItem($idListView, "RowID "&$i&": Col 0")
        ;ConsoleWrite($i & @TAB & "$ret = " & $ret & @CRLF)
        _GUICtrlListView_AddSubItem($idListView, $i, "Row "&$i&": Col 1", 1, Random(0,2,1));

        _GUICtrlListView_AddSubItem($idListView, $i, "Col 2", 2)

        _GUICtrlListView_AddSubItem($idListView, $i, "Col 3", 3)

    Next
    _GUICtrlListView_EndUpdate ($idListView)

EndFunc
;==========================================================================================
Func LWS_WM_NOTIFY( $hWnd, $iMsg, $wParam, $lParam )
    Local Static $tText = DllStructCreate( "wchar[512]" )
    Local Static $pText = DllStructGetPtr( $tText )
    Local Static $aResult, $iRows, $iFrom, $tRectLVI = DllStructCreate( $tagRECT ), $pRectLVI = DllStructGetPtr( $tRectLVI )

    Local $tNMHDR, $hWndFrom, $iCode, $tInfo, $VKey
    $tNMHDR = DllStructCreate( $tagNMHDR, $lParam )
    $hWndFrom = HWnd( DllStructGetData( $tNMHDR, "hWndFrom" ) )
    $iCode = DllStructGetData( $tNMHDR, "Code" )

    Switch $hWndFrom
        Case $hTreeView
            Switch $iCode

                Case $NM_CUSTOMDRAW
                    Local $tNMTVCUSTOMDRAW = DllStructCreate($tagNMTVCUSTOMDRAW, $lParam)
                    Local $dwDrawStage = DllStructGetData($tNMTVCUSTOMDRAW, "DrawStage")

                    Switch $dwDrawStage                                             ; Holds a value that specifies the drawing stage

                        Case $CDDS_PREPAINT
                            ; Before the paint cycle begins
                            Return $CDRF_NOTIFYITEMDRAW ; Notify the parent window of any item-related drawing operations

                        Case $CDDS_ITEMPREPAINT
                            ; Before painting an item
                            Local $hItemSpec  = DllStructGetData($tNMTVCUSTOMDRAW, "ItemSpec")          ; $hItemSpec = $hItem
                            Local $iItemState = DllStructGetData($tNMTVCUSTOMDRAW, "ItemState")
                            Local $iItemParam = DllStructGetData($tNMTVCUSTOMDRAW, "ItemParam")         ; ItemParam = index in array
                            Local $hDC        = DllStructGetData($tNMTVCUSTOMDRAW, "HDC")               ; Handle to the item's device context

                            $iSelected = DllCall( "user32.dll", "lresult", "SendMessageW", "hwnd", $hTreeView, "uint", $TVM_GETITEMSTATE, "wparam", $hItemSpec, "lparam", $TVIS_SELECTED )[0] ; Selected state
                            If BitAND( $iSelected, $TVIS_SELECTED ) Then Return $CDRF_NOTIFYPOSTPAINT

                            ;If Not BitAnd( $iItemState, $CDIS_FOCUS ) Then
                                DllStructSetData( $tNMTVCUSTOMDRAW, "ClrText", $aTreeViewState[$iItemParam][1] )            ; Forecolor of item text
                                ;DllStructSetData( $tNMTVCUSTOMDRAW, "clrTextBk",$aTreeViewState[$iItemParam][1] )  ; Backcolor of item text

                                Local $tRECT = _GUICtrlTreeView_DisplayRectEx ( $hTreeView, $hItemSpec, True)
                                DllStructSetData( $tRECT, "Left", DllStructGetData( $tRECT, "Right") + 7)
                                DllStructSetData( $tRECT, "Right", DllStructGetData( $tRECT, "Right") + 188)


                                _WinAPI_DrawText( $hDC, $aTreeViewState[$iItemParam][3], $tRECT, $DT_LEFT ) ; and background color of the device context.
                                _GUICtrlTreeView_SetBold ($hTreeView, $hItemSpec, $aTreeViewState[$iItemParam][2])
                            ;Else
                                ;_GUICtrlTreeView_SetBold ($TreeView, $hItemSpec, $aTreeViewState[$iItemParam][2])
                            ;EndIf
                            Return $CDRF_NEWFONT ; $CDRF_NEWFONT must be returned after changing font or colors

                        Case $CDDS_ITEMPOSTPAINT
                            Local $hItemSpec  = DllStructGetData($tNMTVCUSTOMDRAW, "ItemSpec")          ; $hItemSpec = $hItem
                            Local $iItemState = DllStructGetData($tNMTVCUSTOMDRAW, "ItemState")
                            Local $iItemParam = DllStructGetData($tNMTVCUSTOMDRAW, "ItemParam")         ; ItemParam = index in array
                            Local $hDC        = DllStructGetData($tNMTVCUSTOMDRAW, "HDC")               ; Handle to the item's device context

                            Local $tRECT = _GUICtrlTreeView_DisplayRectEx( $hTreeView, $hItemSpec, True)
                            DllStructSetData( $tRECT, "Left", DllStructGetData( $tRECT, "Right") + 7)
                            DllStructSetData( $tRECT, "Right", DllStructGetData( $tRECT, "Right") + 188)

                            ;DllStructSetData( $tNMTVCUSTOMDRAW, "ClrText", $aTreeViewState[$iItemParam][1] )            ; Forecolor of item text
                            DllCall( "gdi32.dll", "int", "SetTextColor", "handle", $hDC, "int", 0xFEB577 ) ; 0x77B5FE
                            _WinAPI_SelectObject( $hDC, $aTreeViewState[$iItemParam][2] ? $TreeViewFontBold : $TreeViewFont ) ; Bold/normal font
                            _WinAPI_DrawText( $hDC, $aTreeViewState[$iItemParam][3], $tRECT, $DT_LEFT ) ; and background color of the device context.

                           _GUICtrlTreeView_SetBold ($hTreeView, $hItemSpec, $aTreeViewState[$iItemParam][2])

                           Return $CDRF_NEWFONT ; $CDRF_NEWFONT must be returned after changing font or colors

                    EndSwitch

                Case $TVN_SELCHANGEDA, $TVN_SELCHANGEDW
                    AdlibRegister("SubFunction_FillListView_Delayed",300)
                    _WinAPI_RedrawWindow($hTreeView)

                Case $NM_RCLICK
                    Local $tMPos = _WinAPI_GetMousePos(True, $hWndFrom) ; ?????????? ???????????? ????????
                    Local $hItem = _GUICtrlTreeView_HitTestItem($hWndFrom, DllStructGetData($tMPos, 1), DllStructGetData($tMPos, 2)) ; ???????? ?????????? ??????
                    If $hItem <> -1 And $hItem <> 0x0 Then
                        DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hTVContextMenu, "int", 0, "int", MouseGetPos(0), "int", MouseGetPos(1), "hwnd", $Form1, "ptr", 0)
                    EndIf

                Case $TVN_BEGINDRAGA, $TVN_BEGINDRAGW

                    ConsoleWrite(">             $TVN_BEGINDRAGW" & @CRLF)

            EndSwitch

        Case $hListView
            Switch $iCode
                Case $NM_CUSTOMDRAW
                    Local $tNMLVCUSTOMDRAW = DllStructCreate( $tagNMLVCUSTOMDRAW, $lParam )
                    Switch DllStructGetData( $tNMLVCUSTOMDRAW, "dwDrawStage" )
                        Case $CDDS_PREPAINT                              ; Before the paint cycle begins
                            $hDC = DllStructGetData( $tNMLVCUSTOMDRAW, "hdc" ) ; Device context
                            Return $CDRF_NOTIFYITEMDRAW                    ; Notify the parent window before an item is painted

                        Case $CDDS_ITEMPREPAINT,BitOR($CDDS_ITEMPREPAINT, $CDDS_SUBITEM)                          ; Before an item is painted
                            $iItem = DllStructGetData( $tNMLVCUSTOMDRAW, "dwItemSpec" ) ; Item index
                            $iSubItem = DllStructGetData($tNMLVCUSTOMDRAW, "iSubItem")                  ; Subitem index


                            ;ConsoleWrite("$CDDS_ITEMPREPAINT - > "& $iItem &"/"&$iSubItem & @CRLF)

                            If $iSubItem = 1 Then
                                ConsoleWrite("$CDDS_ITEMPREPAINT - > "& $iItem &"/"&$iSubItem & @CRLF)
                                Return $CDRF_NOTIFYPOSTPAINT
                            EndIf

                            If GUICtrlSendMsg( $idListView, $LVM_GETITEMSTATE, $iItem, $LVIS_SELECTED ) Then; Selected item?
                                ;ConsoleWrite("$CDDS_ITEMPREPAINT - > "& $iItem & @CRLF)
                                ;ConsoleWrite("$CDDS_ITEMPREPAINT - > "& $iItem &"/"&$iSubItem & @CRLF)

                                Return $CDRF_NOTIFYSUBITEMDRAW                 ; Custom drawing of selected items
                            EndIf
                            Return $CDRF_NEWFONT                           ; Default drawing of other items

                        Case $CDDS_ITEMPOSTPAINT,BitOR($CDDS_ITEMPOSTPAINT, $CDDS_SUBITEM)                          ; After an item has been painted
                            $iSubItem = DllStructGetData($tNMLVCUSTOMDRAW, "iSubItem")                  ; Subitem index

                            ConsoleWrite("$CDDS_ITEMPOSTPAINT - > "& $iSubItem & @CRLF)

                            If $iSubItem = 1 Then
                                $iItem = DllStructGetData( $tNMLVCUSTOMDRAW, "dwItemSpec" )
                                ; Subitem rectangle
                                DllStructSetData( $tRectLVI, "Top", $iSubItem )
                                DllStructSetData( $tRectLVI, "Left", $LVIR_ICON )
                                GUICtrlSendMsg( $idListView, $LVM_GETSUBITEMRECT, $iItem, $pRectLVI )
                                _GUIImageList_Draw( $hListView_ImageList, 0, $hDC, DllStructGetData( $tRectLVI, "Left" ), DllStructGetData( $tRectLVI, "Top" ) + 1 )
                                Return $CDRF_NEWFONT                           ; $CDRF_NEWFONT must be returned after changing font or colors
                            EndIf
                    EndSwitch
            EndSwitch









    EndSwitch

    Return $GUI_RUNDEFMSG
EndFunc
;==============================================================================================================================================================================================
Func SetIconListToListView()

    Local $hItemIcon_Item0   = _GDIPlus_BitmapCreateFromMemory(GetIcon_ListView_Item0(),   True)
    Local $hItemIcon_Item1 = _GDIPlus_BitmapCreateFromMemory(GetIcon_ListView_Item1(), True)
    Local $hItemIcon_Item2 = _GDIPlus_BitmapCreateFromMemory(GetIcon_ListView_Item2(), True)

    $hListView_ImageList = _GUIImageList_Create(16, 16, 5, 3)

    _GUIImageList_Add($hListView_ImageList, $hItemIcon_Item0)
    _GUIImageList_Add($hListView_ImageList, $hItemIcon_Item1)
    _GUIImageList_Add($hListView_ImageList, $hItemIcon_Item2)

    _GUICtrlListView_SetImageList($idListView, $hListView_ImageList, 1)

    _WinAPI_DeleteObject($hItemIcon_Item0)
    _WinAPI_DeleteObject($hItemIcon_Item1)
    _WinAPI_DeleteObject($hItemIcon_Item2)

EndFunc
;==============================================================================================================================================================================================
Func GetIcon_ListView_Item0()
    Local $AleciveFlatwokenAppsFileNewsico
    $AleciveFlatwokenAppsFileNewsico &= 'xrcAAAABAAIAICABAXAgAKgQAAAmMAAAABAAOAF4aARoAADOACwoAEwAiACuQAAMAVwoAAMABhcABqoxAAY8EAY7FAM6EAOqOQQDOAADKwADFQADAwChFgARDQ8PYksAV1a4c4SD3H9wk5LlgAADAQcGA5IqkYEB5IUBfoEBkZCVhQHjgQF9gQGQj4UBguKAJd1MV1a/gC0qf4AxP4ABD5A9Ej0AR0afp8C/+bwA2df/wuDe/8Mc4d/CAYElgSmnwL6g+T5HRrSANVCMQQACP0hHkrfT0gb+yTvRIbfT0f4/KEhIs8AcPsViEhUAFTCuyMf4utYg1f+mvr7GALjUAtPGDqW9vf+ftgC2/6vExP+712LWwgC/3NrCCMkMugTX1cYMqcLC/6dEv7/CALTQz8YFroDIxvkOEBB7gB4CFMEfYXBvhcHfAN3/ss3M/4ufIqHGAJqwscYMmrEgsv+Sp6nKAKjBisHAEsjKDJ61tcYMgJCkpv+LnqDCAA6mwCDFBcEaUV1du4OAHoHJAKO7urPBBYC20tH/ma+wygAYorm6wk3BPpetrgHKAKrDw/+0z878/5vAJs0AwRjBDMECwUFjwHbCAL7b2cIgwLXahYAeNsEfvdnXvsIfMNHQ/5jAFcoArq8A/7/d2/+gt7gRziasxsViJparrDduAOEP4SeVYAFpAK3HQsbiD4+ko+NADzdx4Q+/29niD+IvYCWjHLq75jZhAOEPlKmqH2YpZQDhBOBGYgGftrexagbA3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Zyzs/+jursA/63Hxv+mvr4C/4ENt9PS/7DKAMn/ma+w/7jUANP/vdrY/RgbABtdZHNyXLzZGNf/mIARgQGvyckQ/5yys4IForm6C4Ifhw3Igg2mv7//AYEZQ05Ni3GCgQBfvNjX/5qwsQHCC7LNzP+Xra4jwhzBA6O7u8Ilo7tivMIjn7a2wgbAH/8ASFNSjHKDgl+Au9fW/4+jpcItgLjU0v+VqqvGDwHBC5Ooqf+hubkBwC/K/6W9vf+oAMHB/8De3P9JgFNTi3SFhF/JLwCuyMj/qMi//wimxrzGALHTyf8Irs/FwgaasbH/AKnCwv/B393/gElUU4p2hoXCLwiXrK3CD6zGxf8AnMit/5fDp/8AptK2/5/Lr/8AlsOm/5TBpP8GrsA/xRm72Nb/RkBQT4l3h4bCL5QBwCybsbL/sczLAP+xyrv/t8y9AP+9yMD/scm6AP+u2b3/rtK7EP+rxcTGGaW/vkD/P0dHiHjAD7kM1tTCZcFKudXU/wDa2NH/6uTZ/wDp49r/6OPb/wDb2tD/xsXC/wauwE/BCYmdnv+hALq4/z9IR4d4HojAD8AMwWTBALbR0ED/2OLa/9rAANsPwA7BAcUCwQaYr6//gIyhof+iu7rBDxCFeYiHwj+dtLRHwljBXMEBpLy9wAC8EcJbnbS1wHC4/9hA4+P/9fj4wgDTANbW5hkaGix7wIiIW77c2sJ84TaAjaCi/7POzeIAAIyfof+yzMz/AI2ho/+qw8P/CPP29mJr3d3d5hAeHh4tYV9gaGcAIcDb2fuQpaYc/6RgDeFA4TOVqqwj4iThHZ+3t2JW9vkK+WUHLIlvtcXEbBDJ5OL7fWfW2tkK5WAHKxF4Z25uIQCJk5JaiZSTXxVhAIpmAJRkAJNfJ8goKCTtBoABY4ofABMEAOAFAANgBgcAAADADwAA'
    $AleciveFlatwokenAppsFileNewsico = _WinAPI_Base64Decode($AleciveFlatwokenAppsFileNewsico)
    Local $tSource = DllStructCreate('byte[' & BinaryLen($AleciveFlatwokenAppsFileNewsico) & ']')
    DllStructSetData($tSource, 1, $AleciveFlatwokenAppsFileNewsico)
    Local $tDecompress
    _WinAPI_LZNTDecompress($tSource, $tDecompress, 5430)
    $tSource = 0
    Return Binary(DllStructGetData($tDecompress, 1))
EndFunc
;==============================================================================================================================================================================================
Func GetIcon_ListView_Item1()
    Local $AleciveFlatwokenAppsUnlockico
    ;$AleciveFlatwokenAppsUnlockico &= 'NbYAAAABAAIAICABAXAgAKgQAAAmMAAAABAAOAF4aARoAADOACwoAEwAiACuQAAMAVwoAAMABhYABqowAAY7AAY8QAY6AAM6KwADFAADAKEWABACAAkPYRA3VrcYAFWF3BtfluUbKGCX5gMDlgIDGlsAj+YVSnTmFUkCc6QBcuUTQWbdAAwqQr4CBwx+FYAxP4ABD5A9Eg4uAEefJ4DG+SyToOX/LZrwgAHxigEALJXo/yR6vv8IIna4rAG3/yFxAK//HmKX+QskFDe0gDVQjEECEDAASZEukd7+L5wg8P8vnPGOAS2WAOj/JXu+/yR3Arj4ALf/I2+q/lANJTmzwBw9xWIFAA4VLy6L0vgwCJ3x/9EAL5jo/4AmfL7/JXi4/wABwAAka6H5AwgNCnuAHhPBHxxOdISAMp3u/zKe8c4AADCZ6P8nfb7/GCZ5uP8AxgC2/xMYM0u7gB6ByQAwhkDGszOg8f/NADeAofH/4vH7/zUAAOHs9f8rfLr/CCd6uM4AHlJ52gWAHjbBHzid5741iKHy/80AP6by9h4BBQA0grz/KHu5YW4AIVyH40EP4Q87gKHrvzaj8v9tAMRBp/sP7vf9YgD6D0CDvP8pfLluACIUXYjhDzfhDz2j7CC/N6Ty/20APKYQ8f/0+fcLXLTzA2IAFQDz9/v/L4Aguv8qfbluACNeBIni5S8/pe6/OQil8v9tAEGp8v8o/v7+cgv94AJNrh7yYgBhAREAYQc0hLsQ/yx+uW4AJGCKweYPQKjvvzpgLW0AxEWr9y+Z0ffmBGEBgRUAOIa8/yyAYA6hbAAmYovhQA814Q/ARKvwvzyo4C1sAMRFrPcPcb/15gRhAY35Dy7gDW0AKGOM4Q8CNOEPR63x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IkUsu1/DQoXFWFQAcCZXBFaABiIVyMg1tdjgCFX16Phl9ekOCHX1+QiGIAYQFhAgFhA1aBeVwcKifyKeUGgAHjhx8ACwBijgADAAA='

    $AleciveFlatwokenAppsUnlockico = _WinAPI_Base64Decode($AleciveFlatwokenAppsUnlockico)
    Local $tSource = DllStructCreate('byte[' & BinaryLen($AleciveFlatwokenAppsUnlockico) & ']')
    DllStructSetData($tSource, 1, $AleciveFlatwokenAppsUnlockico)
    Local $tDecompress
    _WinAPI_LZNTDecompress($tSource, $tDecompress, 5430)
    $tSource = 0
    Return Binary(DllStructGetData($tDecompress, 1))
EndFunc
;==============================================================================================================================================================================================
Func GetIcon_ListView_Item2()
    Local $AleciveFlatwokenAppsMahjonggico
    $AleciveFlatwokenAppsMahjonggico &= 'bLgAAAABAAIAICABAXAgAKgQAAAmMAAAABAAOAF4aARoAADOACwoAEwAiACuQAAMAVwoAAMABhYABqowAAY7AAY8QAY6AAM6KwADFAADAKEWABAKAA0OYThNULdWAHd83GGGi+VhCIeM5gIDhozmYKCGi+ZfhQgDhIQBAYQHXICF5lFxdhTmUoEBcoQBcXXlAEllad0vQUS+UAgLDH6AMT+AAQ8BkD0SLkBCn4GyALj5lM3V/5vXIN//nNjgggOa1gDf/5jV3/+X1IDe/5bT3v+VgQFw0t3/lIABgQOBAZEAzdf/gLW+/38As7v/gbS8/4IBgAGDtbz/hLa9AYIDfa20/22Wm6D5JzY4tIA1UIxBAAIwQkSRkMfOdv6GO4Q9mYA9hTuBN5Mg0d3/ktDDAJHQAtzCAI7K1v99sgC9/3ywuv99seC6/36yu8YhxSDFIQB6qK7+KTg6sgXAHD3FYg4TFC+J+LzD+MEdxQDCHsQ8wTcBwx3c/5DP3P+PAs7DAI7N3P+LyADV/3qwu/95ruK5wgB7r7rGIdEgwQAAdZ+l+QkNDXsFgB4TwR9NaGyEmvTV3c4elsAewTzBOsUdQI3N2/+MzMAAywDb/4jF1f93rgC7/3aruf93rLC5/3itwADAIHrEIQHVII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5dgQOEDAo9kSCUsqf9woH7LYhZhAmEDYQRhBWEGPwBQUn1VZWchowja4vtlCJjV3v/+lWBBYSThSWEAYQFhAmEDAWUHoNff/BoeHwI/4WehwMVsp9z+42YIYSNhBWENYQBhAWECAWUHpNng/FBiZAqFQAcCZXBdbG4hAHyQk1t8kZRf'
    $AleciveFlatwokenAppsMahjonggico &= 'BXEAfWQAc4WIXCbIKywp5QaAAeOHHwADCwBijgMAAA=='
    $AleciveFlatwokenAppsMahjonggico = _WinAPI_Base64Decode($AleciveFlatwokenAppsMahjonggico)
    Local $tSource = DllStructCreate('byte[' & BinaryLen($AleciveFlatwokenAppsMahjonggico) & ']')
    DllStructSetData($tSource, 1, $AleciveFlatwokenAppsMahjonggico)
    Local $tDecompress
    _WinAPI_LZNTDecompress($tSource, $tDecompress, 5430)
    $tSource = 0
    Return Binary(DllStructGetData($tDecompress, 1))
EndFunc
;==============================================================================================================================================================================================
Func _WinAPI_Base64Decode($sB64String)
    Local $aCrypt = DllCall($hDLL_Crypt32, "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0)
    If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "")
    Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]")
    $aCrypt = DllCall($hDLL_Crypt32, "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0)
    If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "")
    Return DllStructGetData($bBuffer, 1)
EndFunc   ;==>_WinAPI_Base64Decode
;==============================================================================================================================================================================================
Func _WinAPI_LZNTDecompress(ByRef $tInput, ByRef $tOutput, $iBufferSize)
    $tOutput = DllStructCreate("byte[" & $iBufferSize & "]")
    If @error Then Return SetError(1, 0, 0)
    Local $aRet = DllCall($hDLL_ntdll, "uint", "RtlDecompressBuffer", "ushort", 0x0002, "struct*", $tOutput, "ulong", $iBufferSize, "struct*", $tInput, "ulong", DllStructGetSize($tInput), "ulong*", 0)
    If @error Then Return SetError(2, 0, 0)
    If $aRet[0] Then Return SetError(3, $aRet[0], 0)
    Return $aRet[6]
EndFunc   ;==>_WinAPI_LZNTDecompress
;==============================================================================================================================================================================================
Link to comment
Share on other sites

3 hours ago, jpm said:

I confirm even faster ... Awesome work as usual. Thanks Jon

Yes, it's even faster now 👍 ! Thanks to Jon and the testers (again :)).

So finally, it could be sufficient just to replace the old files (AutoIt3.exe and AutoIt3_x64.exe) with the new ones (once released), right? Will there be .exe files for both, the latest stable version (3.3.14.5) and the BETA, if this question is not too premature?

Edited by Musashi

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

@Iczer  I ran your script and got the same issue as you have...It would be nice if you could shrink your code to the section that causes the problem.  NVM, Jon solved the problem, now working.

Edited by Nine
Link to comment
Share on other sites

Now the speed with this simple test scenario is ok but I've troubles with some of my written tools. Windows Screenshooter for examples doesn't react anymore after start. The GUI freezes (not responding) and the mouse movement is also slower than normal.

I would suggest that all test it under real conditions!

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

5 minutes ago, Jon said:

Re-uploaded. Should be fixed.

With this version the GUI doesn't freeze. Continue testing...

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Works 100% fast for me (simplistic test).

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

The display is not performed correctly :

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
#include <WinAPI.au3>

HotKeySet("{END}", "Quit")
OnAutoItExitRegister("CleanUp")

Global $hImage, $GFC, $iInd = 0

Global $hGUI = GUICreate("", 400, 500, -1, -1, $WS_POPUP, $WS_EX_LAYERED + $WS_EX_TOPMOST)
GUISetBkColor(0x00FFFF)
Global $IMG_Ctrl = GUICtrlCreatePic("", 10, 10, -1, -1, -1, $GUI_WS_EX_PARENTDRAG)

_WinAPI_SetLayeredWindowAttributes($hGUI, 0x00FFFF)

GifInit()
AdlibRegister (_Draw_Timer, 80)
GUISetState(@SW_SHOW)

While 1
  If GUIGetMsg() = $GUI_EVENT_CLOSE Then Quit()
WEnd

Func _Draw_Timer()
  If $iInd = $GFC Then $iInd = 0
  GifDrawFrame($iInd)
  $iInd += 1
EndFunc   ;==>_Draw_Timer

Func Quit()
  Exit
EndFunc   ;==>Quit

Func CleanUp()
  _GDIPlus_ImageDispose($hImage)
  _GDIPlus_Shutdown()
EndFunc   ;==>CleanUp

Func GifInit()
  _GDIPlus_Startup()
  $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\xmas tree.gif")
  $GFC = _GDIPlus_ImageGetFrameCount($hImage, $GDIP_FRAMEDIMENSION_TIME)
EndFunc   ;==>GifInit

Func GifDrawFrame($i)
  _GDIPlus_ImageSelectActiveFrame($hImage, $GDIP_FRAMEDIMENSION_TIME, $i)
  Local $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
  _SetBitmapToCtrl($IMG_Ctrl, $hBitmap)
  _WinAPI_DeleteObject($hBitmap)
EndFunc   ;==>GifDrawFrame

Func _SetBitmapToCtrl($CtrlId, $hBitmap)
  Local $hWnd = GUICtrlGetHandle($CtrlId)
  If $hWnd = 0 Then Return SetError(1, 0, 0)
  Local $hPrev = _SendMessage($hWnd, $STM_SETIMAGE, $IMAGE_BITMAP, $hBitmap)
  If @error Then Return SetError(2, 0, 0)
  If $hPrev Then _WinAPI_DeleteObject($hPrev)
  Return 1
EndFunc   ;==>_SetBitmapToCtrl

 

xmas tree.zip

Edited by Nine
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...