Jump to content

Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1


Jos
 Share

Recommended Posts

Running Tidy (22.611.2153.3) this

#cs
                    If GUICtrlRead($c_Checkbox_Preview_Caps_AutoShoot_Every_Frame) = $GUI_CHECKED Then

                        Local $sResult_Crop = _CropImage($b_Window_Active, $AMT_AppDataDir & "\AMT_Temp\screenshots\" & $_PC_file, True, (@DesktopWidth / 5 * 4.5), (@DesktopHeight / 5 * 4.5), -1, -1, 0, 0, $WS_SYSMENU, $WS_EX_CONTEXTHELP, $hGUI_PreviewCap, StringTrimRight($AMT_AppDataDir & "\AMT_Temp\screenshots\" & $_PC_file, 4) & "_Crop.png", $i_JPG_Quality, $i_CropImage_File_Number_Current, $i_CropImage_File_Number_Total, True, $GUI_UNCHECKED, $GUI_CHECKED)
                        $_Rotate_iAngle_Last_Applied = $_Rotate_iAngle_Current

                    Else

                        Local $sResult_Crop = _CropImage($b_Window_Active, $AMT_AppDataDir & "\AMT_Temp\screenshots\" & $_PC_file, True, (@DesktopWidth / 5 * 4.5), (@DesktopHeight / 5 * 4.5), -1, -1, 0, 0, $WS_SYSMENU, $WS_EX_CONTEXTHELP, $hGUI_PreviewCap, StringTrimRight($AMT_AppDataDir & "\AMT_Temp\screenshots\" & $_PC_file, 4) & "_Crop.png", $i_JPG_Quality, $i_CropImage_File_Number_Current, $i_CropImage_File_Number_Total, False, $GUI_UNCHECKED, $GUI_CHECKED)
                        $_Rotate_iAngle_Last_Applied = $_Rotate_iAngle_Current

                    EndIf
                    #ce

becomes this (see missing initial letters for if, else and endif)

#cs
                        f GUICtrlRead($c_Checkbox_Preview_Caps_AutoShoot_Every_Frame) = $GUI_CHECKED Then

                        Local $sResult_Crop = _CropImage($b_Window_Active, $AMT_AppDataDir & "\AMT_Temp\screenshots\" & $_PC_file, True, (@DesktopWidth / 5 * 4.5), (@DesktopHeight / 5 * 4.5), -1, -1, 0, 0, $WS_SYSMENU, $WS_EX_CONTEXTHELP, $hGUI_PreviewCap, StringTrimRight($AMT_AppDataDir & "\AMT_Temp\screenshots\" & $_PC_file, 4) & "_Crop.png", $i_JPG_Quality, $i_CropImage_File_Number_Current, $i_CropImage_File_Number_Total, True, $GUI_UNCHECKED, $GUI_CHECKED)
                        $_Rotate_iAngle_Last_Applied = $_Rotate_iAngle_Current

                        lse

                        Local $sResult_Crop = _CropImage($b_Window_Active, $AMT_AppDataDir & "\AMT_Temp\screenshots\" & $_PC_file, True, (@DesktopWidth / 5 * 4.5), (@DesktopHeight / 5 * 4.5), -1, -1, 0, 0, $WS_SYSMENU, $WS_EX_CONTEXTHELP, $hGUI_PreviewCap, StringTrimRight($AMT_AppDataDir & "\AMT_Temp\screenshots\" & $_PC_file, 4) & "_Crop.png", $i_JPG_Quality, $i_CropImage_File_Number_Current, $i_CropImage_File_Number_Total, False, $GUI_UNCHECKED, $GUI_CHECKED)
                        $_Rotate_iAngle_Last_Applied = $_Rotate_iAngle_Current

                        ndIf
                    #ce

Regards

Karsten

Link to comment
Share on other sites

  • Developers
5 hours ago, KaFu said:

Running Tidy (22.611.2153.3) this

Assume you use the standard /tcb(=0)?
It works fine for me when I Cute&Paste the code and tidy it.
Could you please send me the original file and tell me your tab settings in SciTE?

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

  • 3 weeks later...

Today I get such issue in console:

Quote

>09:16:21 Performing the Program Resource Update steps:
! Removal UpdateResource: RT_VERSION/1 - LastError:87:Parametr jest niepoprawny.
+ UpdateResources other: $result[0] = 0 - LastError:1359:Wystąpił błąd wewnętrzny.
...>Updating Program Version information.
!>09:16:22 Error: EndUpdateResource: Returncode = 0 - LastError:1359:Wystąpił błąd wewnętrzny. rc:2
!>09:16:22 Error: Program Resource updating Failed. The output program will not contain the Resource updates! rc:2

but also message window pop-up

image.png.34ed9d51e48cad974d651285ba3593ca.png

 

How to avoid showing this message - I just want to stop the process by default, and only get error in console.

 

Edited by mLipok

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
2 hours ago, mLipok said:

How to avoid showing this message

Which AutoIt3Wrapper version is this? v 22.611.2153.14 has this line commented already!

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

  • 2 weeks later...

2 suggestions 

* debug highlighted (right click to ClipPut) if i highlight this example will give -> SciTEWindow onto the clipboard

WinAPI_GetClassName(WinGetHandle(""))

* Add right click (Paste clipboard within Quotation Marks) in SciTE for instance "SciTEWindow" or 'SciTEWindow'

 

Edited by Deye
Link to comment
Share on other sites

On 12/2/2022 at 10:25 PM, Jos said:

Not sure what you are proposing here... 

small illustration to cap

#include <WinAPISysWin.au3> ;include directory

#include <Misc.au3>
#include <Array.au3>

Local $hDLL = DllOpen("user32.dll")

OnAutoItExitRegister("Terminate")

HotKeySet("{ESC}", "Terminate")
HotKeySet("!z", "Clip")  ;Alt Z

While 1
    Sleep(10)
WEnd

Func Clip()
    If _IsPressed("10", $hDLL) Then
        ; Wait until key is released.
        While _IsPressed("12 ", $hDLL)
            Sleep(250)
        WEnd
    EndIf
    Sleep(250)
    Send("^c")

    $hWnd = WinGetHandle("")

;~      highlight + right click (highlighted verb_phrase to Put in effect)
;~      Before initiating key combo Please highlight a designated command to carry out-->

;~      _WinAPI_GetClassName($hWnd) =  "SciTEWindow"
;~      _WinAPI_GetWindowText ( $hWnd ) ; _WinAPI_GetClientHeight ( $hWnd )

    $clip = ClipGet()
    $ret = Execute($clip)
    MsgBox("", '', $ret)
EndFunc

Func Terminate()
    DllClose($hDLL)
    Exit
EndFunc

 

Link to comment
Share on other sites

  • Developers

Doubt this is something that belongs in SciTE , so maybe something you could try implementing in LUA, but not one I will be looking at. 

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

  • 1 month later...

Dear Jos,
I regularly use Au3Stripper
I usually use the options: /so or /so /pe or /so /pe /rm
[1]> But I want to keep the comments!

[2]> Keep all variables and functions present in the main file whether it is used or not, only cut at the include files!
Can you add that option?

With the /rm  option
[3]> You can add custom New Function Name and New Variable Name before or after

for example:
Function Name (shortened function name) : FuncName_01
(shortened function name) Function Name : 01_FuncName
Optional Variable Name (shortened variable name) : $VarName_01
(shortened variable name) Optional Variable Name : $01_VarName

Edited by Trong
detailed

Regards,
 

Link to comment
Share on other sites

  • Developers

Why? 
Au3stripper prepares the source to be included into the compiled au3 program, so even if you leave the comment, they will be stripped by aut2exe.

The /MO option will only merge code and will leave the comments, but /so (StripOnly) will strip it from all unneeded characters to compress the compiled file.

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

Ok, just for fun I added an option, but doubt many will ever use it. :) 

I have added option /LeaveMasterComments (/lmc) to the au3parameters for the current beta version of au3stripper, which will leave any comments in the Master script including the #region/#endregion statements. The rest is stripped as before, so that means you will have to run tidy to get the proper indentation again.

Eg test.au3:

#Au3Stripper_Parameters=/LeaveMasterComments
#Region ; *** Include files ***
#include <date.au3>
#EndRegion ; *** Include files ***

#cs
    Demo LeaveMasterComment
#ce
; Comment line 1
ConsoleWrite(_DateDayOfWeek(1) & @CRLF) ; inline comment 1

Will become test_stripped.au3:

#Region ; *** Include files ***
Global Const $DMW_SHORTNAME = 1
Global Const $DMW_LOCALE_LONGNAME = 2
Global Const $STR_STRIPLEADING = 1
Global Const $STR_STRIPTRAILING = 2
Global Const $tagSYSTEMTIME = "struct;word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds;endstruct"
Global Const $LOCALE_INVARIANT = 0x007F
Global Const $LOCALE_USER_DEFAULT = 0x0400
Func _WinAPI_GetDateFormat($iLCID = 0, $tSYSTEMTIME = 0, $iFlags = 0, $sFormat = '')
If Not $iLCID Then $iLCID = 0x0400
If Not StringStripWS($sFormat, $STR_STRIPLEADING + $STR_STRIPTRAILING) Then $sFormat = Null
Local $aCall = DllCall('kernel32.dll', 'int', 'GetDateFormatW', 'dword', $iLCID, 'dword', $iFlags, 'struct*', $tSYSTEMTIME, 'wstr', $sFormat, 'wstr', '', 'int', 2048)
If @error Or Not $aCall[0] Then Return SetError(@error, @extended, '')
Return $aCall[5]
EndFunc
Func _DateDayOfWeek($iDayNum, $iFormat = Default)
Local Const $MONDAY_IS_NO1 = 128
If $iFormat = Default Then $iFormat = 0
$iDayNum = Int($iDayNum)
If $iDayNum < 1 Or $iDayNum > 7 Then Return SetError(1, 0, "")
Local $tSYSTEMTIME = DllStructCreate($tagSYSTEMTIME)
DllStructSetData($tSYSTEMTIME, "Year", BitAND($iFormat, $MONDAY_IS_NO1) ? 2007 : 2006)
DllStructSetData($tSYSTEMTIME, "Month", 1)
DllStructSetData($tSYSTEMTIME, "Day", $iDayNum)
Return _WinAPI_GetDateFormat(BitAND($iFormat, $DMW_LOCALE_LONGNAME) ? $LOCALE_USER_DEFAULT : $LOCALE_INVARIANT, $tSYSTEMTIME, 0, BitAND($iFormat, $DMW_SHORTNAME) ? "ddd" : "dddd")
EndFunc
#EndRegion ; *** Include files ***
#cs
Demo LeaveMasterComment
#ce
; Comment line 1
ConsoleWrite(_DateDayOfWeek(1) & @CRLF) ; inline comment 1

and then Tidied:

#Region ; *** Include files ***
Global Const $DMW_SHORTNAME = 1
Global Const $DMW_LOCALE_LONGNAME = 2
Global Const $STR_STRIPLEADING = 1
Global Const $STR_STRIPTRAILING = 2
Global Const $tagSYSTEMTIME = "struct;word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds;endstruct"
Global Const $LOCALE_INVARIANT = 0x007F
Global Const $LOCALE_USER_DEFAULT = 0x0400
Func _WinAPI_GetDateFormat($iLCID = 0, $tSYSTEMTIME = 0, $iFlags = 0, $sFormat = '')
    If Not $iLCID Then $iLCID = 0x0400
    If Not StringStripWS($sFormat, $STR_STRIPLEADING + $STR_STRIPTRAILING) Then $sFormat = Null
    Local $aCall = DllCall('kernel32.dll', 'int', 'GetDateFormatW', 'dword', $iLCID, 'dword', $iFlags, 'struct*', $tSYSTEMTIME, 'wstr', $sFormat, 'wstr', '', 'int', 2048)
    If @error Or Not $aCall[0] Then Return SetError(@error, @extended, '')
    Return $aCall[5]
EndFunc   ;==>_WinAPI_GetDateFormat
Func _DateDayOfWeek($iDayNum, $iFormat = Default)
    Local Const $MONDAY_IS_NO1 = 128
    If $iFormat = Default Then $iFormat = 0
    $iDayNum = Int($iDayNum)
    If $iDayNum < 1 Or $iDayNum > 7 Then Return SetError(1, 0, "")
    Local $tSYSTEMTIME = DllStructCreate($tagSYSTEMTIME)
    DllStructSetData($tSYSTEMTIME, "Year", BitAND($iFormat, $MONDAY_IS_NO1) ? 2007 : 2006)
    DllStructSetData($tSYSTEMTIME, "Month", 1)
    DllStructSetData($tSYSTEMTIME, "Day", $iDayNum)
    Return _WinAPI_GetDateFormat(BitAND($iFormat, $DMW_LOCALE_LONGNAME) ? $LOCALE_USER_DEFAULT : $LOCALE_INVARIANT, $tSYSTEMTIME, 0, BitAND($iFormat, $DMW_SHORTNAME) ? "ddd" : "dddd")
EndFunc   ;==>_DateDayOfWeek
#EndRegion ; *** Include files ***
#cs
    Demo LeaveMasterComment
#ce
; Comment line 1
ConsoleWrite(_DateDayOfWeek(1) & @CRLF) ; inline comment 1

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
40 minutes ago, Trong said:

That's great, Jos. Thank you.
Can you add button "Run au3Stripper" on AutoIt3Wrapper GUI ? (I can fix it myself but I wish it was a built-in function)

That option is already there, just select the right most Tab:

image.png.bd7cf2653855c0600b7c2365722e6fe5.png

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

  • Developers

This Ctrl+F7 menu is the Compile with options so that is what it does! ;) 
I am not going to add all kinds of buttons for running Tidy/Au3check/Au3Stripper as those can be ran through a ShortCut.
So just add this to your SciTEUser.properties and ensure number 46 is still free in your installation:

command.46.$(au3)="$(SciteDefaultHome)\..\AutoIt3.exe" "$(SciteDefaultHome)\AutoIt3Wrapper\AutoIt3Wrapper.au3" /Prod /AU3Stripper /in "$(FilePath)"
command.name.46.*=Au3Stripper
command.save.before.46.*=1
command.is.filter.46.*=1
command.shortcut.46.*=Ctrl+Shift+O

Now anytime you want to run Au3Stripper you simply do Ctrl+Alt+O.

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

  • 4 weeks later...
  • Developers

Hi Paul,

You always need to use the files that are distributed by the AutoIt3 setup for the latest version of these files.
The installers take of this for you, but when you are using the portable version you have to take care of this yourself. ;) 

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

  • Recently Browsing   0 members

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