Jump to content

Timers not work while using stripper


Recommended Posts

Hello I got errors and timers not work if I use any obfuscator(stripper). All code and things work great after obfuscate but functions with timers dont.

-### StripOnly/StripFunc Error: Found DllCallbackRegister() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.

 

Here are scripts U can try use stripper then functions would not work

https://www.autoitscript.com/autoit3/docs/libfunctions/_Timer_SetTimer.htm

 

Here is written I believe something on this topic https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/Au3Stripper.html

 

Quote

 

    Warn you that the script is likely to have difficulties running if a parameter cannot be determined before run-time.  This usually occurs if:

·    A function takes a literal string parameter defining a function or variable.  In this case the resulting string might not be able to be correctly linked to the correct variable or function name during the process.  This only affects certain AutoIt3 functions:

 

 

 

 

Could I do something with that? I got several functions with timers and I dont want use ignore these functions

#Au3Stripper_Ignore_Funcs=

 

Edited by Miliardsto
Link to comment
Share on other sites

5 hours ago, Miliardsto said:

DllCallbackRegister

Show this line from your script.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

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

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

 

Btw.

This is not kind to bump thread before 24h waiting.

 

 

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

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

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • Developers
10 hours ago, Miliardsto said:

Hello I got errors and timers not work if I use any obfuscator(stripper). All code and things work great after obfuscate but functions with timers dont.

-### StripOnly/StripFunc Error: Found DllCallbackRegister() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.

 

I am seriously wondering why ypou are surprised after simply ignoring the shown error?
It even tells you which line it has problems with. ;)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Its code before stripp

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/tl /debug /pe /so  /rm
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#Au3Stripper_On

#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <ProgressConstants.au3>
#include <Timers.au3>
#include <WindowsConstants.au3>

Global $g_idMemo, $g_hStatus, $g_idProgress, $g_iPercent = 0, $g_iDirection = 1

_Example_CallBack()

Func _Example_CallBack()
    Local $hGUI, $iTimerProgress, $idChange, $iWait = 10, $idState
    Local $aParts[3] = [75, 330, -1]

    $hGUI = GUICreate("Timers Using CallBack Function(s)", 400, 320)
    $g_idMemo = GUICtrlCreateEdit("", 2, 32, 396, 226, BitOR($WS_HSCROLL, $WS_VSCROLL))
    GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New")
    $idState = GUICtrlCreateButton("Start Progress Bar", 70, 270, 100, 25)
    $idChange = GUICtrlCreateButton("Change", 215, 270, 90, 25)
    GUICtrlSetState($idChange, $GUI_DISABLE)
    $g_hStatus = _GUICtrlStatusBar_Create($hGUI, $aParts)
    _GUICtrlStatusBar_SetText($g_hStatus, "Timers")
    _GUICtrlStatusBar_SetText($g_hStatus, @TAB & @TAB & StringFormat("%02d:%02d:%02d", @HOUR, @MIN, @SEC), 2)
    $g_idProgress = GUICtrlCreateProgress(0, 0, -1, -1, $PBS_SMOOTH)
    GUICtrlSetColor($g_idProgress, 0xff0000)
    _GUICtrlStatusBar_EmbedControl($g_hStatus, 1, GUICtrlGetHandle($g_idProgress))
    GUISetState(@SW_SHOW)

    _Timer_SetTimer($hGUI, 1000, "_UpdateStatusBarClock") ; create timer

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $idState
                If GUICtrlRead($idState) = "Start Progress Bar" Then
                    $iTimerProgress = _Timer_SetTimer($hGUI, $iWait, "_UpdateProgressBar") ; create timer
                    If @error Or $iTimerProgress = 0 Then ContinueLoop
                    GUICtrlSetData($idState, "Stop Progress Bar")
                    GUICtrlSetState($idChange, $GUI_ENABLE)
                Else
                    GUICtrlSetState($idChange, $GUI_DISABLE)
                    _Timer_KillTimer($hGUI, $iTimerProgress)
                    GUICtrlSetData($idState, "Start Progress Bar")
                EndIf

            Case $idChange
                If $iWait = 10 Then
                    $iWait = 250
                Else
                    $iWait = 10
                EndIf
                MemoWrite("Timer for _UpdateProgressBar set at: " & $iWait & " milliseconds")
                $iTimerProgress = _Timer_SetTimer($hGUI, $iWait, "", $iTimerProgress) ; reuse timer with different interval
        EndSwitch
    WEnd
    ConsoleWrite("Killed All Timers? " & _Timer_KillAllTimers($hGUI) & @CRLF) ; must be True as the timer to "_UpdateStatusBarClock" have not been killed
    GUIDelete()
EndFunc   ;==>_Example_CallBack

; call back function
Func _UpdateStatusBarClock($hWnd, $iMsg, $iIDTimer, $iTime)
    #forceref $hWnd, $iMsg, $iIDTimer, $iTime
    _GUICtrlStatusBar_SetText($g_hStatus, @TAB & @TAB & StringFormat("%02d:%02d:%02d", @HOUR, @MIN, @SEC), 2)
EndFunc   ;==>_UpdateStatusBarClock

; call back function
Func _UpdateProgressBar($hWnd, $iMsg, $iIDTimer, $iTime)
    #forceref $hWnd, $iMsg, $iIDTimer, $iTime
    $g_iPercent += 5 * $g_iDirection
    GUICtrlSetData($g_idProgress, $g_iPercent)
    If $g_iPercent = 100 Or $g_iPercent = 0 Then $g_iDirection *= -1
    If $g_iPercent = 100 Then
        GUICtrlSetColor($g_idProgress, 0xff0000)
    ElseIf $g_iPercent = 0 Then
        GUICtrlSetColor($g_idProgress, 0x0000ff)
    EndIf
EndFunc   ;==>_UpdateProgressBar

; Write a line to the memo control
Func MemoWrite($sMessage)
    GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1)
EndFunc   ;==>MemoWrite

 

and the code after strip. in this code below is error and timers not work and $idState not call function

#Au3Stripper_On
Global Enum $0 = 0, $1, $2, $3
Func _0(Const $4 = @error, Const $5 = @extended)
Local $6 = DllCall("kernel32.dll", "dword", "GetLastError")
Return SetError($4, $5, $6[0])
EndFunc
Func _3($7, $8, $9, $a, $b = 0, $c = 0)
Local $d = DllCall("advapi32.dll", "bool", "AdjustTokenPrivileges", "handle", $7, "bool", $8, "struct*", $9, "dword", $a, "struct*", $b, "struct*", $c)
If @error Then Return SetError(@error, @extended, False)
Return Not($d[0] = 0)
EndFunc
Func _9($e = $2)
Local $d = DllCall("advapi32.dll", "bool", "ImpersonateSelf", "int", $e)
If @error Then Return SetError(@error, @extended, False)
Return Not($d[0] = 0)
EndFunc
Func _d($f, $g)
Local $d = DllCall("advapi32.dll", "bool", "LookupPrivilegeValueW", "wstr", $f, "wstr", $g, "int64*", 0)
If @error Or Not $d[0] Then Return SetError(@error, @extended, 0)
Return $d[3]
EndFunc
Func _f($h, $i = 0, $j = False)
If $i = 0 Then
Local $6 = DllCall("kernel32.dll", "handle", "GetCurrentThread")
If @error Then Return SetError(@error + 10, @extended, 0)
$i = $6[0]
EndIf
Local $d = DllCall("advapi32.dll", "bool", "OpenThreadToken", "handle", $i, "dword", $h, "bool", $j, "handle*", 0)
If @error Or Not $d[0] Then Return SetError(@error, @extended, 0)
Return $d[4]
EndFunc
Func _g($h, $i = 0, $j = False)
Local $7 = _f($h, $i, $j)
If $7 = 0 Then
Local Const $k = 1008
If _0() <> $k Then Return SetError(20, _0(), 0)
If Not _9() Then Return SetError(@error + 10, _0(), 0)
$7 = _f($h, $i, $j)
If $7 = 0 Then Return SetError(@error, _0(), 0)
EndIf
Return $7
EndFunc
Func _h($7, $l, $m)
Local $n = _d("", $l)
If $n = 0 Then Return SetError(@error + 10, @extended, False)
Local Const $o = "dword Count;align 4;int64 LUID;dword Attributes"
Local $p = DllStructCreate($o)
Local $q = DllStructGetSize($p)
Local $b = DllStructCreate($o)
Local $r = DllStructGetSize($b)
Local $s = DllStructCreate("int Data")
DllStructSetData($p, "Count", 1)
DllStructSetData($p, "LUID", $n)
If Not _3($7, False, $p, $q, $b, $s) Then Return SetError(2, @error, False)
DllStructSetData($b, "Count", 1)
DllStructSetData($b, "LUID", $n)
Local $t = DllStructGetData($b, "Attributes")
If $m Then
$t = BitOR($t, 0x00000002)
Else
$t = BitAND($t, BitNOT(0x00000002))
EndIf
DllStructSetData($b, "Attributes", $t)
If Not _3($7, False, $b, $r, $p, $s) Then Return SetError(3, @error, False)
Return True
EndFunc
Global Const $u = "struct;long Left;long Top;long Right;long Bottom;endstruct"
Global Const $v = "uint cbSize;uint fMask;uint fStyle;dword clrFore;dword clrBack;ptr lpText;uint cch;" & "int iImage;hwnd hwndChild;uint cxMinChild;uint cyMinChild;uint cx;handle hbmBack;uint wID;uint cyChild;uint cyMaxChild;" & "uint cyIntegral;uint cxIdeal;lparam lParam;uint cxHeader" &((@OSVersion = "WIN_XP") ? "" : ";" & $u & ";uint uChevronState")
Global Const $w = "handle hProc;ulong_ptr Size;ptr Mem"
Func _m(ByRef $x)
Local $y = DllStructGetData($x, "Mem")
Local $0z = DllStructGetData($x, "hProc")
Local $10 = _0z($0z, $y, 0, 0x00008000)
DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $0z)
If @error Then Return SetError(@error, @extended, False)
Return $10
EndFunc
Func _s($11, $12, ByRef $x)
Local $6 = DllCall("user32.dll", "dword", "GetWindowThreadProcessId", "hwnd", $11, "dword*", 0)
If @error Then Return SetError(@error + 10, @extended, 0)
Local $13 = $6[2]
If $13 = 0 Then Return SetError(1, 0, 0)
Local $h = BitOR(0x00000008, 0x00000010, 0x00000020)
Local $0z = _10($h, False, $13, True)
Local $14 = BitOR(0x00002000, 0x00001000)
Local $y = _x($0z, 0, $12, $14, 0x00000004)
If $y = 0 Then Return SetError(2, 0, 0)
$x = DllStructCreate($w)
DllStructSetData($x, "hProc", $0z)
DllStructSetData($x, "Size", $12)
DllStructSetData($x, "Mem", $y)
Return $y
EndFunc
Func _u(ByRef $x, $15, $16, $12)
Local $6 = DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", DllStructGetData($x, "hProc"), "ptr", $15, "struct*", $16, "ulong_ptr", $12, "ulong_ptr*", 0)
If @error Then Return SetError(@error, @extended, False)
Return $6[0]
EndFunc
Func _v(ByRef $x, $15, $16 = 0, $12 = 0, $17 = "struct*")
If $16 = 0 Then $16 = DllStructGetData($x, "Mem")
If $12 = 0 Then $12 = DllStructGetData($x, "Size")
Local $6 = DllCall("kernel32.dll", "bool", "WriteProcessMemory", "handle", DllStructGetData($x, "hProc"), "ptr", $16, $17, $15, "ulong_ptr", $12, "ulong_ptr*", 0)
If @error Then Return SetError(@error, @extended, False)
Return $6[0]
EndFunc
Func _x($0z, $18, $12, $19, $1a)
Local $6 = DllCall("kernel32.dll", "ptr", "VirtualAllocEx", "handle", $0z, "ptr", $18, "ulong_ptr", $12, "dword", $19, "dword", $1a)
If @error Then Return SetError(@error, @extended, 0)
Return $6[0]
EndFunc
Func _0z($0z, $18, $12, $1b)
Local $6 = DllCall("kernel32.dll", "bool", "VirtualFreeEx", "handle", $0z, "ptr", $18, "ulong_ptr", $12, "dword", $1b)
If @error Then Return SetError(@error, @extended, False)
Return $6[0]
EndFunc
Func _10($h, $1c, $13, $1d = False)
Local $6 = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $h, "bool", $1c, "dword", $13)
If @error Then Return SetError(@error + 10, @extended, 0)
If $6[0] Then Return $6[0]
If Not $1d Then Return 0
Local $7 = _g(BitOR(0x00000020, 0x00000008))
If @error Then Return SetError(@error + 20, @extended, 0)
_h($7, "SeDebugPrivilege", True)
Local $1e = @error
Local $1f = @extended
Local $1g = 0
If Not @error Then
$6 = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $h, "bool", $1c, "dword", $13)
$1e = @error
$1f = @extended
If $6[0] Then $1g = $6[0]
_h($7, "SeDebugPrivilege", False)
If @error Then
$1e = @error + 30
$1f = @extended
EndIf
Else
$1e = @error + 40
EndIf
DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $7)
Return SetError($1e, $1f, $1g)
EndFunc
Func _11($11, $1h, $1i = 0, $1j = 0, $1k = 0, $1l = "wparam", $1m = "lparam", $1n = "lresult")
Local $6 = DllCall("user32.dll", $1n, "SendMessageW", "hwnd", $11, "uint", $1h, $1l, $1i, $1m, $1j)
If @error Then Return SetError(@error, @extended, "")
If $1k >= 0 And $1k <= 4 Then Return $6[$1k]
Return $6
EndFunc
Global Const $1o = 0X400
Global Const $1p =($1o + 7)
Global Const $1q =($1o + 10)
Global Const $1r = 0x2000 + 6
Global Const $1s =($1o + 14)
Global Const $1t =($1o + 4)
Global Const $1u =($1o + 1)
Global Const $1v =($1o + 11)
Global Const $1w = $1u
Global Const $1x = 0xff
Global Const $1y = Ptr(-1)
Global Const $1z = Ptr(-1)
Global Const $20 = BitShift(0x0100, 8)
Global Const $21 = BitShift(0x2000, 8)
Global Const $22 = BitShift(0x8000, 8)
Global $23[64][2] = [[0, 0]]
Func _1r($24, $25, $g, $26, $27, $28, $29, $2a, $2b, $2c = 0, $2d = 0, $2e = 0)
If $2d = 0 Then $2d = _3e("")
Local $6 = DllCall("user32.dll", "hwnd", "CreateWindowExW", "dword", $24, "wstr", $25, "wstr", $g, "dword", $26, "int", $27, "int", $28, "int", $29, "int", $2a, "hwnd", $2b, "handle", $2c, "handle", $2d, "struct*", $2e)
If @error Then Return SetError(@error, @extended, 0)
Return $6[0]
EndFunc
Func _3e($2f)
Local $2g = "wstr"
If $2f = "" Then
$2f = 0
$2g = "ptr"
EndIf
Local $6 = DllCall("kernel32.dll", "handle", "GetModuleHandleW", $2g, $2f)
If @error Then Return SetError(@error, @extended, 0)
Return $6[0]
EndFunc
Func _3y($11)
Local $2h = _41($11)
If @error Then Return SetError(@error, @extended, 0)
Return DllStructGetData($2h, "Bottom") - DllStructGetData($2h, "Top")
EndFunc
Func _41($11)
Local $2h = DllStructCreate($u)
Local $2i = DllCall("user32.dll", "bool", "GetWindowRect", "hwnd", $11, "struct*", $2h)
If @error Or Not $2i[0] Then Return SetError(@error + 10, @extended, 0)
Return $2h
EndFunc
Func _44($11, ByRef $2j)
Local $6 = DllCall("user32.dll", "dword", "GetWindowThreadProcessId", "hwnd", $11, "dword*", 0)
If @error Then Return SetError(@error, @extended, 0)
$2j = $6[2]
Return $6[0]
EndFunc
Func _45($11)
Local $2h = _41($11)
If @error Then Return SetError(@error, @extended, 0)
Return DllStructGetData($2h, "Right") - DllStructGetData($2h, "Left")
EndFunc
Func _4b($11, ByRef $2k)
If $11 = $2k Then Return True
For $2l = $23[0][0] To 1 Step -1
If $11 = $23[$2l][0] Then
If $23[$2l][1] Then
$2k = $11
Return True
Else
Return False
EndIf
EndIf
Next
Local $2j
_44($11, $2j)
Local $2m = $23[0][0] + 1
If $2m >= 64 Then $2m = 1
$23[0][0] = $2m
$23[$2m][0] = $11
$23[$2m][1] =($2j = @AutoItPID)
Return $23[$2m][1]
EndFunc
Func _4y($11, $27, $28, $29, $2a, $2n = True)
Local $6 = DllCall("user32.dll", "bool", "MoveWindow", "hwnd", $11, "int", $27, "int", $28, "int", $29, "int", $2a, "bool", $2n)
If @error Then Return SetError(@error, @extended, False)
Return $6[0]
EndFunc
Func _5v($2o, $2p)
Local $6 = DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $2o, "hwnd", $2p)
If @error Then Return SetError(@error, @extended, 0)
Return $6[0]
EndFunc
Global $2q[16][55535 + 2 + 1]
Func _6r($11)
Local $2r, $2s = -1, $2t = True
If Not WinExists($11) Then Return SetError(-1, -1, 0)
For $2u = 0 To 16 - 1
If $2q[$2u][0] <> 0 Then
If Not WinExists($2q[$2u][0]) Then
For $2v = 0 To UBound($2q, 2) - 1
$2q[$2u][$2v] = 0
Next
$2q[$2u][1] = 10000
$2t = False
EndIf
EndIf
Next
For $2u = 0 To 16 - 1
If $2q[$2u][0] = $11 Then
$2s = $2u
ExitLoop
EndIf
Next
If $2s = -1 Then
For $2u = 0 To 16 - 1
If $2q[$2u][0] = 0 Then
$2q[$2u][0] = $11
$2q[$2u][1] = 10000
$2t = False
$2s = $2u
ExitLoop
EndIf
Next
EndIf
If $2s = -1 And $2t Then Return SetError(16, 0, 0)
If $2q[$2s][1] = 10000 + 55535 Then
For $2w = 2 To UBound($2q, 2) - 1
If $2q[$2s][$2w] = 0 Then
$2r =($2w - 2) + 10000
$2q[$2s][$2w] = $2r
Return $2r
EndIf
Next
Return SetError(-1, 55535, 0)
EndIf
$2r = $2q[$2s][1]
$2q[$2s][1] += 1
$2q[$2s][($2r - 10000) + 2] = $2r
Return $2r
EndFunc
Global $2x
Global Const $2y = "msctls_statusbar32"
Global Const $2z = "int BX;int BY;int RX"
Func _6t($11, $30 = -1, $31 = "", $32 = -1, $33 = 0x00000000)
If Not IsHWnd($11) Then Return SetError(1, 0, 0)
Local $26 = BitOR(0x40000000, 0x10000000)
If $32 = -1 Then $32 = 0x00000000
If $33 = -1 Then $33 = 0x00000000
Local $34[1], $35[1]
If @NumParams > 1 Then
If IsArray($30) Then
$34 = $30
Else
$34[0] = $30
EndIf
If @NumParams = 2 Then
ReDim $35[UBound($34)]
Else
If IsArray($31) Then
$35 = $31
Else
$35[0] = $31
EndIf
If UBound($34) <> UBound($35) Then
Local $36
If UBound($34) > UBound($35) Then
$36 = UBound($35)
ReDim $35[UBound($34)]
Else
$36 = UBound($34)
ReDim $34[UBound($35)]
For $2v = $36 To UBound($34) - 1
$34[$2v] = $34[$2v - 1] + 75
Next
$34[UBound($35) - 1] = -1
EndIf
EndIf
EndIf
If Not IsHWnd($11) Then $11 = HWnd($11)
If @NumParams > 3 Then $26 = BitOR($26, $32)
EndIf
Local $2r = _6r($11)
If @error Then Return SetError(@error, @extended, 0)
Local $37 = _1r($33, $2y, "", $26, 0, 0, 0, 0, $11, $2r)
If @error Then Return SetError(@error, @extended, 0)
If @NumParams > 1 Then
_7i($37, UBound($34), $34)
For $2v = 0 To UBound($35) - 1
_7k($37, $35[$2v], $2v)
Next
EndIf
Return $37
EndFunc
Func _6v($11, $38, $39, $3a = 4)
Local $3b = _74($11, $38)
Local $3c = $3b[0]
Local $3d = $3b[1]
Local $3e = $3b[2] - $3c
Local $3f = $3b[3] - $3d
Local $3g = $3c
Local $3h = $3d
Local $3i = _45($39)
Local $3j = _3y($39)
If $3i > $3e Then $3i = $3e
If $3j > $3f Then $3j = $3f
Local $3k =($3e - $3i) / 2
Local $3l =($3f - $3j) / 2
If $3k < 0 Then $3k = 0
If $3l < 0 Then $3l = 0
If BitAND($3a, 1) = 1 Then $3g = $3c + $3k
If BitAND($3a, 2) = 2 Then $3h = $3d + $3l
If BitAND($3a, 4) = 4 Then
$3k = _6y($11)
$3l = _6z($11)
$3g = $3c
If _7d($11) Then $3g += $3k
$3h = $3d + $3l
$3i = $3e -($3k * 2)
$3j = $3f -($3l * 2)
EndIf
_5v($39, $11)
_4y($39, $3g, $3h, $3i, $3j)
EndFunc
Func _6w($11)
Local $3m = DllStructCreate($2z)
Local $1g
If _4b($11, $2x) Then
$1g = _11($11, $1p, 0, $3m, 0, "wparam", "struct*")
Else
Local $12 = DllStructGetSize($3m)
Local $x
Local $y = _s($11, $12, $x)
$1g = _11($11, $1p, 0, $y, 0, "wparam", "ptr")
_u($x, $y, $3m, $12)
_m($x)
EndIf
Local $3n[3]
If $1g = 0 Then Return SetError(-1, -1, $3n)
$3n[0] = DllStructGetData($3m, "BX")
$3n[1] = DllStructGetData($3m, "BY")
$3n[2] = DllStructGetData($3m, "RX")
Return $3n
EndFunc
Func _6y($11)
Local $3n = _6w($11)
Return SetError(@error, @extended, $3n[2])
EndFunc
Func _6z($11)
Local $3n = _6w($11)
Return SetError(@error, @extended, $3n[1])
EndFunc
Func _74($11, $38)
Local $2h = _75($11, $38)
If @error Then Return SetError(@error, 0, 0)
Local $3b[4]
$3b[0] = DllStructGetData($2h, "Left")
$3b[1] = DllStructGetData($2h, "Top")
$3b[2] = DllStructGetData($2h, "Right")
$3b[3] = DllStructGetData($2h, "Bottom")
Return $3b
EndFunc
Func _75($11, $38)
Local $2h = DllStructCreate($u)
Local $1g
If _4b($11, $2x) Then
$1g = _11($11, $1q, $38, $2h, 0, "wparam", "struct*")
Else
Local $3o = DllStructGetSize($2h)
Local $x
Local $y = _s($11, $3o, $x)
$1g = _11($11, $1q, $38, $y, 0, "wparam", "ptr")
_u($x, $y, $2h, $3o)
_m($x)
EndIf
Return SetError($1g = 0, 0, $2h)
EndFunc
Func _7b($11)
Return _11($11, $1r) <> 0
EndFunc
Func _7d($11)
Return _11($11, $1s) <> 0
EndFunc
Func _7e($11)
_11($11, 0x05)
EndFunc
Func _7i($11, $3p = -1, $34 = 25)
Local $3q, $3r = 1
If IsArray($3p) <> 0 Then
$3p[UBound($3p) - 1] = -1
$3r = UBound($3p)
$3q = DllStructCreate("int[" & $3r & "]")
For $2v = 0 To $3r - 2
DllStructSetData($3q, 1, $3p[$2v], $2v + 1)
Next
DllStructSetData($3q, 1, -1, $3r)
ElseIf IsArray($34) <> 0 Then
$3r = UBound($34)
$3q = DllStructCreate("int[" & $3r & "]")
For $2v = 0 To $3r - 2
DllStructSetData($3q, 1, $34[$2v], $2v + 1)
Next
DllStructSetData($3q, 1, -1, $3r)
ElseIf $3p > 1 Then
$3r = $3p
$3q = DllStructCreate("int[" & $3r & "]")
For $2v = 1 To $3r - 1
DllStructSetData($3q, 1, $34 * $2v, $2v)
Next
DllStructSetData($3q, 1, -1, $3r)
Else
$3q = DllStructCreate("int")
DllStructSetData($3q, $3r, -1)
EndIf
If _4b($11, $2x) Then
_11($11, $1t, $3r, $3q, 0, "wparam", "struct*")
Else
Local $12 = DllStructGetSize($3q)
Local $x
Local $y = _s($11, $12, $x)
_v($x, $3q)
_11($11, $1t, $3r, $y, 0, "wparam", "ptr")
_m($x)
EndIf
_7e($11)
Return True
EndFunc
Func _7k($11, $3s = "", $38 = 0, $3t = 0)
Local $3u = _7b($11)
Local $3v = StringLen($3s) + 1
Local $3w
If $3u Then
$3w = DllStructCreate("wchar Text[" & $3v & "]")
$3v *= 2
Else
$3w = DllStructCreate("char Text[" & $3v & "]")
EndIf
DllStructSetData($3w, "Text", $3s)
If _7d($11) Then $38 = $1x
Local $1g
If _4b($11, $2x) Then
$1g = _11($11, $1v, BitOR($38, $3t), $3w, 0, "wparam", "struct*")
Else
Local $x
Local $y = _s($11, $3v, $x)
_v($x, $3w)
If $3u Then
$1g = _11($11, $1v, BitOR($38, $3t), $y, 0, "wparam", "ptr")
Else
$1g = _11($11, $1w, BitOR($38, $3t), $y, 0, "wparam", "ptr")
EndIf
_m($x)
EndIf
Return $1g <> 0
EndFunc
Global $3x[1][3]
Func _7s($11)
Local $3y = $3x[0][0]
If $3y = 0 Then Return False
Local $6, $3z = 0
For $2v = $3y To 1 Step -1
If IsHWnd($11) Then
$6 = DllCall("user32.dll", "bool", "KillTimer", "hwnd", $11, "uint_ptr", $3x[$2v][1])
Else
$6 = DllCall("user32.dll", "bool", "KillTimer", "hwnd", $11, "uint_ptr", $3x[$2v][0])
EndIf
If @error Or $6[0] = 0 Then Return SetError(@error, @extended, False)
$3z = $3x[$2v][2]
If $3z <> 0 Then DllCallbackFree($3z)
$3x[0][0] -= 1
Next
ReDim $3x[1][3]
Return True
EndFunc
Func _7t($11, $40)
Local $6[1] = [0], $3z = 0, $41 = UBound($3x) - 1
For $2v = 1 To $41
If $3x[$2v][0] = $40 Then
If IsHWnd($11) Then
$6 = DllCall("user32.dll", "bool", "KillTimer", "hwnd", $11, "uint_ptr", $3x[$2v][1])
Else
$6 = DllCall("user32.dll", "bool", "KillTimer", "hwnd", $11, "uint_ptr", $3x[$2v][0])
EndIf
If @error Or $6[0] = 0 Then Return SetError(@error, @extended, False)
$3z = $3x[$2v][2]
If $3z <> 0 Then DllCallbackFree($3z)
For $42 = $2v To $41 - 1
$3x[$42][0] = $3x[$42 + 1][0]
$3x[$42][1] = $3x[$42 + 1][1]
$3x[$42][2] = $3x[$42 + 1][2]
Next
ReDim $3x[UBound($3x - 1)][3]
$3x[0][0] -= 1
ExitLoop
EndIf
Next
Return $6[0] <> 0
EndFunc
Func _7w($11, $43 = 250, $44 = "", $40 = -1)
Local $6[1] = [0], $45 = 0, $3z = 0, $2u = $3x[0][0] + 1
If $40 = -1 Then
ReDim $3x[$2u + 1][3]
$3x[0][0] = $2u
$40 = $2u + 1000
For $2v = 1 To $2u
If $3x[$2v][0] = $40 Then
$40 = $40 + 1
$2v = 0
EndIf
Next
If $44 <> "" Then
$3z = DllCallbackRegister($44, "none", "hwnd;uint;uint_ptr;dword")
If $3z = 0 Then Return SetError(-1, -1, 0)
$45 = DllCallbackGetPtr($3z)
If $45 = 0 Then Return SetError(-1, -1, 0)
EndIf
$6 = DllCall("user32.dll", "uint_ptr", "SetTimer", "hwnd", $11, "uint_ptr", $40, "uint", $43, "ptr", $45)
If @error Or $6[0] = 0 Then Return SetError(@error, @extended, 0)
$3x[$2u][0] = $6[0]
$3x[$2u][1] = $40
$3x[$2u][2] = $3z
Else
For $2v = 1 To $2u - 1
If $3x[$2v][0] = $40 Then
If IsHWnd($11) Then $40 = $3x[$2v][1]
$3z = $3x[$2v][2]
If $3z <> 0 Then
$45 = DllCallbackGetPtr($3z)
If $45 = 0 Then Return SetError(-1, -1, 0)
EndIf
$6 = DllCall("user32.dll", "uint_ptr", "SetTimer", "hwnd", $11, "uint_ptr", $40, "uint", $43, "ptr", $45)
If @error Or $6[0] = 0 Then Return SetError(@error, @extended, 0)
ExitLoop
EndIf
Next
EndIf
Return $6[0]
EndFunc
Global $46, $47, $48, $49 = 0, $4a = 1
_7x()
Func _7x()
Local $4b, $4c, $4d, $4e = 10, $4f
Local $3p[3] = [75, 330, -1]
$4b = GUICreate("Timers Using CallBack Function(s)", 400, 320)
$46 = GUICtrlCreateEdit("", 2, 32, 396, 226, BitOR(0x00100000, 0x00200000))
GUICtrlSetFont($46, 9, 400, 0, "Courier New")
$4f = GUICtrlCreateButton("Start Progress Bar", 70, 270, 100, 25)
$4d = GUICtrlCreateButton("Change", 215, 270, 90, 25)
GUICtrlSetState($4d, 128)
$47 = _6t($4b, $3p)
_7k($47, "Timers")
_7k($47, @TAB & @TAB & StringFormat("%02d:%02d:%02d", @HOUR, @MIN, @SEC), 2)
$48 = GUICtrlCreateProgress(0, 0, -1, -1, 1)
GUICtrlSetColor($48, 0xff0000)
_6v($47, 1, GUICtrlGetHandle($48))
GUISetState(@SW_SHOW)
_7w($4b, 1000, "_UpdateStatusBarClock")
While 1
Switch GUIGetMsg()
Case -3
ExitLoop
Case $4f
If GUICtrlRead($4f) = "Start Progress Bar" Then
$4c = _7w($4b, $4e, "_UpdateProgressBar")
If @error Or $4c = 0 Then ContinueLoop
GUICtrlSetData($4f, "Stop Progress Bar")
GUICtrlSetState($4d, 64)
Else
GUICtrlSetState($4d, 128)
_7t($4b, $4c)
GUICtrlSetData($4f, "Start Progress Bar")
EndIf
Case $4d
If $4e = 10 Then
$4e = 250
Else
$4e = 10
EndIf
_80("Timer for _UpdateProgressBar set at: " & $4e & " milliseconds")
$4c = _7w($4b, $4e, "", $4c)
EndSwitch
WEnd
ConsoleWrite("Killed All Timers? " & _7s($4b) & @CRLF)
GUIDelete()
EndFunc
Func _80($4g)
GUICtrlSetData($46, $4g & @CRLF, 1)
EndFunc

 

Link to comment
Share on other sites

  • Developers

Understand, but guess my statement is more about the fact that you do not understand that you have a shotgun in your hand and it is pointing to your feet, and still pull the trigger.

So:

  1. Do you understand what au3stripper does?
  2. Do you understand why you get the errror feedback from au3stripper when you run it?
  3. Why do you still expect your script to run?
  4. advice: start using au3stripper without the /RM option so you still are able to read the output script.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Im not understand everything thats why I ask about this. I made research and I read what I was found but I cannot solve this.

Quote

Not sure what you are proposing here, but Obfuscator will throw this Error/Warning whenever DllCallbackRegister() or other funcs are used that will likely disable the script.

 

Jos

so can i make something with that?

is there other possibility to run timers?

I found there is other function like timer

AdlibRegister('_MouseMove', 2000*60)   ; calls the function every 2000*60 ms
OnAutoItExitRegister('_UnRegister')    ; unregister the callback function when the script ends

After stripping it wont give DllCallbackRegister() error

 

 

Link to comment
Share on other sites

  • Developers

Yea, so it really isn't that difficult as I assume your callback func _UpdateStatusBarClock() gets stripped as au3stripper is unable to figure out that it is used .... hence the error from au3stripper.

To avoid that _UpdateStatusBarClock gets stripped at all, you simply add this line to your script:

#Au3Stripper_Ignore_Funcs=_UpdateStatusBarClock

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

×
×
  • Create New...