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

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

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?


GoodKeys is my main product made using Python and AutoIt https://forum.ableton.com/viewtopic.php?t=220718

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


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

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. 
 


Kind Regards
Skeletor

"I need coffee to turn me back to a human"

Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen

Share this post


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

GoodKeys is my main product made using Python and AutoIt https://forum.ableton.com/viewtopic.php?t=220718

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


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

Share this post


Link to post
Share on other sites

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

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
 

 


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

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


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

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Bhooshan
      I need to mute an ongoing call on Microsoft teams without activating the window. Teams allows us to mute using shortcut key Ctrl+Shift+m but only when the window is active.
      # Used set option as ongoing call can be with any person which leads to change in Title Name.
      AutoItSetOption ( "WinTitleMatchMode", 2 ) 
      # I am not clear with the control ID which will be good to use here and also the key combination of ^M       
      ControlSend ( "Microsoft Teams", "", "[CLASS:Intermediate D3D Window; INSTANCE:1]", "{ctrl down}")
       
      Can anyone help...!!! 
       

    • By Sayed
      Hi there, 
      I'm new in AutoIt forms and using AutoIt to automate desktop application (able to automate the application normally but facing issue when I've to re-run the application twice within the same script...so need help in this please)
      here is the steps then followed by the issue in a brief : 
      1- run application . 
      2- do some actions (click menus,activate windows,set texts..)
      3- close the application. 
      4- run the application again & access the same controls.
      5- open the same windows again (like step 2)
      6- perform some validations (by getting texts from some text boxes)
      7- close the application again (and repeat 1-7 for 15 times in average )
      The issue 
      * all controls are accessible in the first run and actions done successfully on controls (for steps 1-3) BUT from the second run of the application from step-4 it's able to set focus only the main application window.
      Note: only unique properties used to while mapping the controls. 
      Error that appear in the console :
      UIAWrappers.au3" (1673) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $x = Int($t[1] + ($t[3] / 2)) $x = Int($t[1] + (^ ERROR  
      Simple spy code  of one of the controls that has this strange issue(menubar&view menu Item): 
      ;~ *** Standard code maintainable *** #include "UIAWrappers.au3" AutoItSetOption("MustDeclareVars", 1) _UIA_setVar("oP1","Title:=XXX;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app") ;main app form xxx _UIA_setVar("oP2","Title:=menuStrip1;controltype:=UIA_MenuBarControlTypeId;class:=WindowsForms10.Window.8.app") ;menuStrip1 ;~ $oUIElement=_UIA_getObjectByFindAll("View.mainwindow", "title:=View;ControlType:=UIA_MenuItemControlTypeId", $treescope_subtree) _UIA_setVar("oUIElement","Title:=View;controltype:=UIA_MenuItemControlTypeId;class:=") ;ControlType:=UIA_MenuItemControlTypeId;classname:=") ;~ Actions split away from logical/technical definition above can come from configfiles ;~_UIA_Action("oP1","highlight") _UIA_Action("oP1","setfocus") ;~_UIA_Action("oP2","highlight") _UIA_Action("oP2","setfocus") _UIA_action("oUIElement","highlight") ;~_UIA_action("oUIElement","click")  
       
    • By Fenzik
      Hello All!
      i suggest to set default encoding in Scite4 for Autoit 3 to UTF 8 with Bom encoding, format recommended also in Autoit Help.
      In last editor version, when i open new script, for example Czech characters (č, ř, ž) aren't correct.
      So when i change Encoding to UTF 8 with Bom from Default Code page property state, everithing seems to be OK.
      Thank you and sorry for potentialy duplicated content.
      Fenzik
    • By jitb
      I have an eof problem in SciTE. I keep gitting this knitsu at the end of the open sesion.
      Please see below. The file should end at line 1220 but has invisable lines. What am I doing wrong?
    • 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
×
×
  • Create New...