Jump to content

Recommended Posts

Posted

Hi,

Part of my standard template for a new project is including the lines:

    #AutoIt3Wrapper_Run_Au3Stripper=y ;Run Au3Stripper before compilation (Default=n)
    #Au3Stripper_Parameters=/mo ;     Use the parameters as listed above

I extensively use bookmarks to jump back and forth between sections of code while debugging and I am experiencing an annoyance that I'm hoping someone could steer me towards a "better" solution.

The problem is when I go to compile code, all of my bookmarks get deleted.
I have determined that if I comment out the line    #AutoIt3Wrapper_Run_Au3Stripper then the issue no longer happens and my bookmarks remain.

Are there some other properties I could be setting somewhere to keep the line in place yet not destroy my bookmarks on every compile?

Thanks

SciTE Version 3.7.3     Feb 16 2017 21:41:17
AutoIT 3.3.14.5

Posted

use current version of Au3Stripper.

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:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

I did a little more digging and have narrowed it down a bit further.

First off my Scite was out of date (17.224.935.0 vs 21.316.1639.02) so I updated that as well.

Following mLipok's advice I also looked for what I thought was a possible newer version of AU3stripper from:

https://www.autoitscript.com/site/autoit-script-editor/downloads/
https://www.autoitscript.com/autoit3/scite/download/Au3Stripper.zip

however this was the same build as I was originally running. the only difference I can see is that the zip file contains one additional .dat file which I also used and it made no difference.

 

image.png.eec0591223b9f0ed4da14f3513a90b78.png

 

I then came up with a more accurate "stripped down" version of my template and realized that I made a mistake in my original reporting as to which lines are causing the issue.


Here's a sample to reproduce the issue. simply set a breakpoint/bookmark  anywhere then hit F7 to compile. You will see that the bookmark disappears when the compile is done.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****

#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Res_Fileversion=0.1.0.13
;#AutoIt3Wrapper_Res_ProductVersion=0.0

#AutoIt3Wrapper_Compression=0
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n

#AutoIt3Wrapper_Run_Au3Stripper=y ;Run Au3Stripper before compilation (Default=n)
#Au3Stripper_Parameters=/mo ;     Use the parameters as listed above
;#Au3Stripper_Off                       ;            Stop the Stripping process below this line
;#Au3Stripper_On                        ;           Start the Stripping process below this line
;#Au3Stripper_Ignore_Funcs=             ;    Do not Strip these functions
;#Au3Stripper_Ignore_Variables=         ;   Do not Strip these variables


#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****


Local $x
For $x = 0 To 1
    Local $temp = $x
Next

 

The two lines I originally reported on are definitely part of the equation:

#AutoIt3Wrapper_Run_Au3Stripper=y ;Run Au3Stripper before compilation (Default=n)
#Au3Stripper_Parameters=/mo ;     Use the parameters as listed above

however I realized my mistake is that you also need to include the auto increment=y line as well.

#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Res_Fileversion=0.1.0.13

 

I can't be sure but I think what is happening is that when you comment out the auto increment line but leave the rest of the template intact - the reason the bookmark does not get deleted is perhaps because the script file is not being modified because the version number gets changed when auto increment is enabled  but not when disabled which is expected behavior. I think perhaps it is the update of the version number (and hence the modification of the script file) which is actually what is deleting the bookmarks although of course I'm not the expert here.

of course I could be completely wrong in my assumption but that's my best guess at this time.

 

what are your thoughts, and if I am correct is there a solution?

 

 

Thank you...

 

 

 

Posted
  On 11/16/2021 at 9:43 PM, AutoJohn said:

You will see that the bookmark disappears when the compile is done.

Expand  

Confirmed as an strange behavior.

@Jos Please check the following snippet as this is smaller/better repro script :

#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Run_Au3Stripper=y

For $i = 1 To 1
Next
; Bookmark this line with CTRL+F2 and then try to compile with F7

; QUESTION: Why Bookmark disappear after compilation ?

 

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:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Developers
Posted

You are right when talking about standard SciTE behavior, but AutoIt3Wrpper should restore them at the end and I know what the issue is now.
Just need some time to fix and test. ;) 

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 (edited)
  On 11/16/2021 at 10:35 PM, Nine said:

Since the script is completely changed with stripper, removing bookmarks seems logical, no ?

Expand  

Stripped is to a brand new file with suffix ****_stripped.au3 but the orginal file line counts will not change.
This was a bug becuase we are talking about Bookmarks in orginal file.

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:

  Reveal hidden contents

Signature last update: 2023-04-24

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
×
×
  • Create New...