Jump to content

January 2, 2019: New SciTE4AutoIt3 available with the updated SciTE v4.1.2 release


Jos
 Share

Recommended Posts

Even though there's a difference, it's so small does it REALLY matter? These EXEs are tiny in comparison to the smallest drive they could be used on I hardly see why it matters.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

3 hours ago, NSUSpray said:

example_callback.exe - 980 KB

Au3Stripper ended with errors, using original scriptfile.rc:1

That is why the file size is different, otherwise, the out put of the stripper would show, as it shows in example.exe

>Running Au3Stripper (19.102.1901.3)  from:C:\ProgFilesSelf\AutoIt3\SciTE\Au3Stripper cmdline:
- 1.61 Iteration 1 Strip Functions result: Output  2769 lines, stripped 13558 Func lines and 11797 Commentlines
- 2.38 Iteration 2 Strip Variables result: Output  422 lines and stripped 2347 lines
- 2.41 Iteration 3 Strip Variables result: Output  342 lines and stripped 80 lines
- 2.45 Iteration 4 Strip Variables result: Output  339 lines and stripped 3 lines
- 2.48 Iteration 5 Strip Variables result: Output  339 lines and stripped 0 lines
+> Source    28480 lines 1344593 Characters.
+> Stripped  15988 Func/Var lines and  11797 comment lines, Total 1328832 Characters.
+> Saved     97% lines 98% Characters.
+> Au3Stripper v19.102.1901.3 finished created:C:\ProgFilesSelf\PortableStuff\ControlViewer\testThis\example_stripped.au3
+>22:18:36 Au3Stripper ended.rc:0

 

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

Au3Stripper ended with errors, using original scriptfile.rc:1

The *_stripped.au3 is there but it exit with errors and is now using the original *.au3 for compilation, not the *_stripped.au3 one  ;) 

PS: ..and leaving the stripped file there, is good for troubleshooting. So is not a flaw to leave it there.

Edited by argumentum
clarification on the stripped file

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

  • Developers
1 hour ago, NSUSpray said:

But how do errors affect size so much? Resulting example_stripped.au3 and example_callback_stripped.au3 are identifical!

That is the whole purpose of au3stripper, to strip the shitload of included code not used by the script.

Quote

+> Stripped  15988 Func/Var lines and  11797 comment lines, Total 1328832 Characters.


I have indeed changed the default that, in case errors are detected, the original script is used, because too many people simply ignored the messages from au3stripper and complained about the script not working anymore.
This can be overridden when you are sure your script isn't crippled by adding this directive:

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

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

40 minutes ago, Jos said:

That is the whole purpose of au3stripper, to strip the shitload of included code not used by the script.

I have indeed changed the default that, in case errors are detected, the original script is used…

Then why the result of the stripper with errors (that is, when a full-fledged original code is taken instead of stripped, as you say) is compiled into an executable file with a smaller size than when errors do not occur?

Link to comment
Share on other sites

  • Developers
9 hours ago, NSUSpray said:

Then why the result of the stripper with errors (that is, when a full-fledged original code is taken instead of stripped, as you say) is compiled into an executable file with a smaller size than when errors do not occur?

Though I covered that in my previous post or do you mean this question:

Quote

Resulting example_stripped.au3 and example_callback_stripped.au3 are identifical!

.. which I do not understand as normally the original script contains only your code and misses the include files code lines.
So please give me some exact data en, as requested, a simple example showing me what you mean as the posted example is not clear to me what you are saying. (sorry )

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

On 4/28/2019 at 10:55 AM, Jos said:

I have indeed changed the default that, in case errors are detected, the original script is used, because too many people simply ignored the messages from au3stripper and complained about the script not working anymore.
This can be overridden when you are sure your script isn't crippled by adding this directive:

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

 

Thank you, Jos! I got it. In version 16 there were errors, in the window I chose “continue”, the stripper continued his work and the output was a small executable file. In version 19 errors also occurred, but the window did not appear, the stripper was automatically turned off and the output was a large executable file.

I added the ForceUse directive and now the executable file is small in size again!

Edited by NSUSpray
Link to comment
Share on other sites

  • 2 weeks later...

So I was in remote desktop and moved it to the other monitor, that I left with DPI to 150% and, long story short.

; https://www.autoitscript.com/forum/topic/182423-wrong-screen-resolution-displayed-by-autoit-macros/?do=findComment&comment=1310175
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_HiDpi=Y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware")

looks good in the Wrapper  :) 

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

  • Developers
1 hour ago, Iczer said:

It seems I somehow enabled their deletion, but don't know how to make SciTE to keep them back instead...

That is the default behaviour as they normally don't serve any purpose. :) 
... but I can only assume you didn't first open the Helpfile that comes with the full SciTE4AutoIt3 version, as it is documented.

Quote
strip.trailing.spaces
strip.trailing.spaces.filepattern
Strips trailing white spaces from the file while saving.
The global strip.trailing.spaces property can be overridden for files that match a pattern by using the file pattern forms:
strip.trailing.spaces.*.yaml=0
or
strip.trailing.spaces.$(file.patterns.yaml)=0

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

  • 2 months later...

Au3Stripper:  changed variable names x   eval(.....)

change variable names is one of the functions of the stripper/obfuscator and it´s great!

In a program, I use eval("variableName" & $K). WIthout compile, the program Works great.

But after compiled with #Au3Stripper_Parameters=/so /rm, the program din´t work anymore. After some time looking for the problem I realize the it coudn´t, as the variable names changed !

The point is: I can´t deactivate this function, as it obfuscate the program up to a almost unreadable code.... on other hand, the smallest code would be to use eval....  Any suggestion?

 

Edited by joseLB
Link to comment
Share on other sites

  • Developers

I am pretty sure you got an error/warning from au3stripper about the Eval() statement....right?

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

5 hours ago, Jos said:

I am pretty sure you got an error/warning from au3stripper about the Eval() statement....right?

Jos

Thanks Jos

I just compiled the program. The .AU3 with GO is ok.     But the .exe don´t (as expected).

This is a piece of the program that after stripper don´t work    (as expected)

For $K=1 to 11
    MsgBox(4096,$K, GUICtrlRead( eval ( "tlNivMan_" & $K) ) &@cr& eval ( "tlNivMan_" & $K) &@cr& "tlNivMan_" & $K ) ;*** to show the problem
    If GUICtrlRead( eval( "tlNivMan_" & $K) ) = $GUI_CHECKED Then
        $nivel= 25 - ($K-1) * 5
    EndIf
Next

Follows the compilation messages, where I coudn´t find the error... I´m surprised...

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /ShowGui /prod /in "C:\SMB\Central_PC\V6\Central_V6_6_E.au3"
+>09:49:20 Starting AutoIt3Wrapper v.19.102.1901.0 SciTE v.4.1.2.0   Keyboard:00000416  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64  Environment(Language:0416)  CodePage:0  utf8.auto.check:0
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\José\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Jose\AppData\Local\AutoIt v3\SciTE
-> No changes made..
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:C:\SMB\Central_PC\V6\Central_V6_6_E.au3
+>09:49:25 AU3Check ended.rc:0
>Running Au3Stripper (19.102.1901.0)  from:C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper cmdline:
- 4.34 Iteration 1 Strip and Rename Functions result: Output  10512 lines and stripped 15851 lines
- 10.70 Iteration 2 Strip Variables result: Output  6907 lines and stripped 3605 lines
- 12.30 Iteration 3 Strip Variables result: Output  6786 lines and stripped 121 lines
- 13.78 Iteration 4 Strip Variables result: Output  6781 lines and stripped 5 lines
- 15.41 Iteration 5 Strip and Rename Variables result: Output  6781 lines and stripped 0 lines
+> Source    43813 lines 2118346 Characters.
+> Stripped  19582 Func/Var lines and  16897 comment lines, Total 1914390 Characters.
+> Saved     83% lines 90% Characters.
+> Au3Stripper v19.102.1901.0 finished created:C:\SMB\Central_PC\V6\Central_V6_6_E_stripped.au3
+>09:49:41 Au3Stripper ended.rc:0
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:C:\SMB\Central_PC\V6\Central_V6_6_E_stripped.au3
+>09:49:41 AU3Check ended.rc:0
>Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe  /in "C:\SMB\Central_PC\V6\Central_V6_6_E_stripped.au3" /out "C:\Users\José\AppData\Local\AutoIt v3\Aut2exe\~AUED31.tmp.exe" /nopack /icon "C:\SMB\Central_PC\V6\TIKUNA32.ico" /comp 2
+>09:49:42 Aut2exe.exe ended.C:\Users\José\AppData\Local\AutoIt v3\Aut2exe\~AUED31.tmp.exe. rc:0
+>09:49:42 Created program:C:\SMB\Central_PC\V6\Central_V6_6Teste.exe
+>09:49:42 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 23.03

 

Link to comment
Share on other sites

Of course, I could implent a CASE, as they are about "just" 11+9= 19 loops.

Or  arrays. On that case, as koda does not create fields into array, I would have to edit later the generated code, and that makes upgrades to screens a non automatic thing....

My question is if there is not a clever way?

Regards

Jose

Edited by joseLB
Link to comment
Share on other sites

  • Developers

I get this for your short piece of code:

#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/so /rm
$GUI_CHECKED =0
For $K=1 to 11
    MsgBox(4096,$K, GUICtrlRead( eval ( "tlNivMan_" & $K) ) &@cr& eval ( "tlNivMan_" & $K) &@cr& "tlNivMan_" & $K ) ;*** to show the problem
    If GUICtrlRead( eval( "tlNivMan_" & $K) ) = $GUI_CHECKED Then
        $nivel= 25 - ($K-1) * 5
    EndIf
Next
>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /NoStatus /prod /in "D:\Development\AutoIt3\programs\test\test\test.au3"
+>18:19:43 Starting AutoIt3Wrapper v.18.708.1148.9 SciTE v.4.1.2.0   Keyboard:00020409  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0413)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\jvdza\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\jvdza\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:D:\Development\AutoIt3\programs\test\test\test.au3
+>18:19:43 AU3Check ended.rc:0
>Running Au3Stripper (19.524.1057.0)  from:C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper cmdline:
- 0.05 Iteration 1 Strip and Rename Functions result: Output  7 lines and stripped 0 lines
-### StripOnly/StripFunc Error: Found eval() statement using unsolvable variable, which will/could lead to removal of Global Const definition for this variable.
>### current Func: @@
C:\Users\jvdza\AppData\Local\Temp\OBsD34A.tmp(3,1): Warning for line:MsgBox(4096,$K, GUICtrlRead( eval("tlNivMan_" & $K) ) &@cr& eval("tlNivMan_" & $K) &@cr& "tlNivMan_" & $K ) 

-### StripOnly/StripFunc Error: Found eval() statement using unsolvable variable, which will/could lead to removal of Global Const definition for this variable.
>### current Func: @@
C:\Users\jvdza\AppData\Local\Temp\OBsD34A.tmp(3,1): Warning for line:MsgBox(4096,$K, GUICtrlRead( eval("tlNivMan_" & $K) ) &@cr& eval("tlNivMan_" & $K) &@cr& "tlNivMan_" & $K ) 

-### StripOnly/StripFunc Error: Found eval() statement using unsolvable variable, which will/could lead to removal of Global Const definition for this variable.
>### current Func: @@
C:\Users\jvdza\AppData\Local\Temp\OBsD34A.tmp(4,1): Warning for line:If GUICtrlRead( eval( "tlNivMan_" & $K) ) = $GUI_CHECKED Then 

-=============================================================================================================
-#### Au3Stripper Found   3 Error(s)!!!!    This means your script could have problems running properly.  ####
-=============================================================================================================
- 0.05 Iteration 2 Strip Variables result: Output  7 lines and stripped 0 lines
- 0.06 Iteration 3 Strip and Rename Variables result: Output  7 lines and stripped 0 lines
+> Au3Stripper v19.524.1057.0 finished merging 9 lines of code, stripped 2 comment lines and Merged 0 Continuation lines.
+>        Created:D:\Development\AutoIt3\programs\test\test\test_stripped.au3 with 7 lines.
!>18:19:43 ---------------------------------------------------------------
!>18:19:43 Au3Stripper ended with errors, using original scriptfile.rc:3
!>18:19:43 ---------------------------------------------------------------
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:D:\Development\AutoIt3\programs\test\test\test.au3
+>18:19:44 AU3Check ended.rc:0
>Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe  /in "D:\Development\AutoIt3\programs\test\test\test.au3" /out "C:\Users\jvdza\AppData\Local\AutoIt v3\Aut2exe\~AUD3B6.tmp.exe" /nopack /icon "C:\Program Files (x86)\AutoIt3\Icons\au3.ico" /comp 2
+>18:19:44 Aut2exe.exe ended.C:\Users\jvdza\AppData\Local\AutoIt v3\Aut2exe\~AUD3B6.tmp.exe. rc:0
+>18:19:44 Created program:D:\Development\AutoIt3\programs\test\test\test.exe
+>18:19:44 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 1.776

So as you can see the warning/errors are there and the script is reverted to the original version.

This is all with this latest version of the SciTE4AutoIt3 installer. 

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

  • Developers

I am obviously running the latest Beta, but would have expected the same for the latest production. 
Did you try the small script on your latest production install and did it not generate the errors?

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

  • Jos locked and unpinned this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...