Jump to content
Jos

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

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

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
Share on other sites
Posted (edited)
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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

I used to be worried about the size of the AutoIt compiled program, but not any more as my programs are now used on larger scaled computers. 
 

Share this post


Link to post
Share on other sites
Posted (edited)
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

trailing spaces in script - is there a option to keep/delete in SciTE4AutoIt3?

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
Share on other sites

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

Jos

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
Share on other sites

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
 

 

Share this post


Link to post
Share on other sites

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

Thanks Jos, as expected now... I will upgrade it.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

  • Similar Content

    • By AutoitMike
      Scite 3.4.4
      Win 10
      I click "Help" or press F1, there is no response
      If I use the file explorer and double click Autoit.chm or Autoit3.chm help opens.
      There is no dialog to check or uncheck "Always ask before opening this file" when clicking on these files.
       
      If you are curious as to why I dont have the latest version, I am creating a back up laptop that has a VERY extensive automation application that I have written over the past 15 years.
       
      An extremely potent, powerful, needed function has been deleted in the upgrade of Autoit in recent years that I can not do without. If my main laptop dies, which it almost did, I am in a very bad position. So I bought the exact same laptop and I am "cofiguring" it to work exactly the same as my main laptop. However, this one has been "Upgraded" to Win 10 which I hope is not the problem. 
      Thanks for any help
    • By Beege
      If you have every taken the time to set up a nice dark theme for your scite editor, you probably noticed shortly after a small yet really annoying flaw. For what ever reason, scite is not set up to let you change the caret fore color and caret line color per language. This really sucks if say you want to edit a properties file or any of the many other languages that Scite currently is setup to support. Pretty much all the other languages are set as light theme so unless you change the theme for those file types, you end up with something like below where the line color and caret are still using the dark theme colors. Line 3 in the pic:
       

       
      To get around this I came up with the following that seems to work pretty well.  
       
      Add the following properties to SciteUser.properties file (Options -> Open User Options File). Update colors to your own needs. You can addionally add any other propertys that dont have a lexer language option in the same fashion.
      # The default values (light themes) will be used for any lexer other than au3 caret.default.fore=#000000 caret.default.line.back=#FFFED8 selection.default.fore=#006000 selection.default.back=#F0A0A8 caret.au3.fore=#FFFFFF caret.au3.line.back=#111111 selection.au3.fore=#C2FFAE selection.au3.back=#f9f9f9  
      Add the following function to PersonalTools.Lua file. As jos pointed out, the OnStartup covers the filetab switches as well as the startup so only need the one function:
      function PersonalTools:OnStartup() -- the "and" + "or" keywords are ternary operators here local sLex = self:IsLexer(SCLEX_AU3) and 'au3' or 'default' props['caret.line.back'] = props['caret.' .. sLex .. '.line.back'] props['caret.fore'] = props['caret.' .. sLex .. '.fore'] props['selection.fore'] = props['selection.' .. sLex .. '.fore'] props['selection.back'] = props['selection.' .. sLex .. '.back'] end
      Last restart SciTE and that should be it. Let me know if you have any issues. Thanks
       
    • By ozymandius257
      Is there a way to remove the numbers from the tabs in Scite?
      When you have multiple autoit programs open, the tabs are numbered, so you'll get something like 1 ProgramA.au3    2 Program2.au3   3 Program3.au3
      I am working on programs with numbers as the first character, so I get  1 3-DoThis.au3     2 4-DoAnother.au3   3 5-DoTheRest.au3  (not the real program names, obviously :))
      It would be nice if I could get rid of the tab number, and just have the program name on each tab.
       
       
    • By SgtHugoStiglitz
      HI people,
                        I got a questions, I maintain code in autoIT and every time I compile a new version or modification, Scite generate 2 folders. One folder is finish by released and the other is tentative. I try to make some google search, but never find answer would satisfied myself. The dev who was maintain it before were using AutoIt3Wrapper_GUI, and I don't know if it's related. I look both folder, but they seem pretty identical, but I would like to know what it's the difference between those to folder. Anyone have a clue?
    • By user4157124
      ConsoleWrite('>Message here.' & @CRLF) outputs colored text (per + > - ! characters).
      ConsoleWrite('warning' & @TAB & '38' & @TAB & 'more text ...' & @CRLF) enables jump to line 38 on doubleclick.

      Using "jump to line" format, only red and pink text coloring seems possible (simply prefixing color directives to output-text disables jump to line functionality). Is it possible to combine the two (define custom color while keeping "jump to line" functionality)?
×
×
  • Create New...