Jump to content

Au3Stripper - StripOnly/StripFunc Error: Found AdlibUnRegister() statement using unsolvable Func


Go to solution Solved by Jos,

Recommended Posts

Posted

Coding "WMCDIPC ( x32/x64, user/admin, self triggering, slow WM_COPYDATA IPC )" I added #Au3Stripper_Off/#Au3Stripper_On to avoid Au3Stripper's complain.
But then ( today ) am like, why ?. So I stated playing around and I don't see any errors in execution other than the complains.
Tried using #Au3Stripper_Ignore_Errors_in_Funcs= but it didn't ignore them. 

Using #AutoIt3Wrapper_Au3stripper_OnError=ForceUse in the example did use it but I'd like to exempt the UDF only, not the whole script, because all am vetting for is the UDF.

@Jos, any way to exempt the UDF only ( w/o #Au3Stripper On/Off ) ?

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

Posted
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=y
#AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#AutoIt3Wrapper_Run_Au3Stripper=y ; or not
#Au3Stripper_Parameters=/rm /sv /rsln /pe
;#AutoIt3Wrapper_Au3stripper_OnError=ForceUse
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

Global $_g__Mytest = _TestFuncDefault

test()
Func test()
    AdlibRegister(FuncName($_g__Mytest), 10)
    Sleep(1000)
EndFunc

Func _TestFuncDefault()
    AdlibUnRegister(_TestFuncDefault)
    ConsoleWrite('@@ Debug (' & @ScriptLineNumber & ') : _TestFuncDefault' & @CRLF)
    MsgBox(262144, @ScriptName, '@@ Debug (' & @ScriptLineNumber & ') : _TestFuncDefault', 10)
EndFunc

"WMCDIPC ( x32/x64, user/admin, self triggering, slow WM_COPYDATA IPC )" is the full script(s) but the above is basically the issue. 

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

  • Developers
Posted (edited)

So you tried something like this and have issue in the generated stripped script?:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=y
#AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#AutoIt3Wrapper_Run_Au3Stripper=y ; or not
#Au3Stripper_Parameters=/rm /sv /rsln /pe
#Au3Stripper_Ignore_Funcs= _TestFuncDefault
;#AutoIt3Wrapper_Au3stripper_OnError=ForceUse
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

Global $_g__Mytest = _TestFuncDefault

test()
Func test()
    AdlibRegister(FuncName($_g__Mytest), 10)
    Sleep(1000)
EndFunc   ;==>test

Func _TestFuncDefault()
    #
    AdlibUnRegister(_TestFuncDefault)
    ConsoleWrite('@@ Debug (' & @ScriptLineNumber & ') : _TestFuncDefault' & @CRLF)
    MsgBox(262144, @ScriptName, '@@ Debug (' & @ScriptLineNumber & ') : _TestFuncDefault', 10)
EndFunc   ;==>_TestFuncDefault

 

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.
  :)

Posted

yes: 

>Running AU3Check (3.3.17.0)  params:-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7  from:D:\Utilities\AutoIt3  input:D:\Utilities\DarkUp and border set thingy\WMCDIPC_Mockup.au3
+>12:05:20 AU3Check ended. rc:0
>Running Au3Stripper (23.402.1150.1)  from:D:\Utilities\AutoIt3\SciTE\Au3Stripper cmdline:
-### StripOnly/StripFunc Error: Found AdlibRegister() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.
>### current Func: _0     Original_Func_Name:test
D:\Utilities\DarkUp and border set thingy\WMCDIPC_Mockup.au3(14,1): Warning for line:AdlibRegister(FuncName($_g__Mytest), 10) 

-=============================================================================================================
-#### Au3Stripper Found   1 Error(s)!!!!    This means your script could have problems running properly.  ####
-=============================================================================================================
---   0.00 Iteration 1 Strip and Rename Functions result: Output  12 lines and stripped 0 lines
---   0.00 Iteration 2 Strip Variables result: Output  12 lines and stripped 0 lines
---   0.00 Iteration 3 Strip Variables result: Output  12 lines and stripped 0 lines
---   0.00 Iteration 4 Strip and Rename Variables result: Output  12 lines and stripped 0 lines
+> Au3Stripper v23.402.1150.1 finished merging 23 lines of code, stripped 11 comment lines and Merged 0 Continuation lines.
+>        Created:D:\Utilities\DarkUp and border set thingy\WMCDIPC_Mockup_stripped.au3 with 12 lines.
!>12:05:21 ---------------------------------------------------------------
!>12:05:21 Au3Stripper ended with errors, using original scriptfile. rc:1
!>12:05:21 ---------------------------------------------------------------
>Running AU3Check (3.3.17.0)  params:-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7  from:D:\Utilities\AutoIt3  input:D:\Utilities\DarkUp and border set thingy\WMCDIPC_Mockup.au3
+>12:05:21 AU3Check ended. rc:0
>Running:(3.3.16.1):D:\Utilities\AutoIt3\aut2exe\aut2exe.exe  /in "D:\Utilities\DarkUp and border set thingy\WMCDIPC_Mockup.au3" /out "C:\Users\Tester\AppData\Local\AutoIt v3\Aut2exe\~AUE94A.tmp.exe" /nopack /comp 2 /x64
+>12:05:21 Aut2exe.exe ended.C:\Users\Tester\AppData\Local\AutoIt v3\Aut2exe\~AUE94A.tmp.exe.  rc:0
+>12:05:21 Created program:D:\Utilities\DarkUp and border set thingy\WMCDIPC_Mockup.exe
+>12:05:22 AutoIt3Wrapper Finished.

 

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

  • Developers
  • Solution
Posted (edited)

I wasn't asking for the AutoIt3Wrapper output but rather the stripped version of the script! ;) 

So when you are sure the generated script is correct, you can force the use of it as long as you don't come crying to me! Just use directive:

#AutoIt3Wrapper_Au3stripper_OnError=             ;(C/S/ForceUse) Continue/Stop on Errors/Continue using stripped source in Exe (Default=C)

The default behavior is to use the original when the au3stripper process isn't sure about being correct. (got sick and tired of people complaining the script wouldn't run properly after they simply ignored all these warnings/errors. )

 

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.
  :)

Posted
5 minutes ago, Jos said:

...but rather the stripped version of the script! ;) 

With #Au3Stripper_Ignore_Funcs= _TestFuncDefault or not, the script looks good.
But yes, I imagined that there is good reason to keep it the way it is.

It would be handy a "#Au3Stripper_Disregard_errors_in_these_func" with a list of functions.
Since I know what am doing ( most of the time ) that would be good to have but, some times if it wasn't for all these utilities you've put together, my code would not run and wouldn't know why.

Maybe you should move this thread to "Whishes people demand from @Jos" :D

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

  • Developers
Posted (edited)
18 minutes ago, argumentum said:

It would be handy a "#Au3Stripper_Disregard_errors_in_these_func" with a list of functions.

Not sure if I understand this question really, but honestly am not looking for making it more complex than it is as people currently already have no clue why au3stripper doesn't understand why variables containing names of variables or function is a no-no for the stripper to understand.

.. and since you know what you are doing, you simply use the solution I gave and simply check if the errors/warnings are correct as far as you are concerned.

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.
  :)

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
  • Recently Browsing   0 members

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