Jump to content

Recommended Posts

  • Developers

Just had a play and added the option to copy the comments with the current available Tidy version in Beta:

Quote

added option  to copy comments from #CS to #CE. Default is to copy the comments.
Added Tidy Parameters:  /Skip_CE_Comment or /scec will skip this copy action
Added INI option:
* * *  Add comment to #CE/#CommentEnd and make it the same as the #CS/CommentStart Comments.
ce_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

  • 2 months later...

Morning

Another question. Maybe I miss something.

Scite can add the version to the source, on Build or Compile, such as 123.1.2.3. 

But what I am actually looking for is to include the COMPILE DATE in the source code. 

 

Is there a switch for this?

 

Thanks

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

  • Developers

I guess you mean AutoIt3Wrapper. I use this directive to add that to the PE header:

://////=__=

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

  • 2 weeks later...

My dear Sir, please be so kind as to explain your explanation? :)

"C:\AutoIt\pegasi\main.au3" (15) : ==> Error in expression.:
://////=__=
^ ERROR
->19:56:51 AutoIt3.exe ended.rc:1
+>19:56:51 AutoIt3Wrapper Finished.
>Exit code: 1    Time: 13.13
;                The last header lines...
#AutoIt3Wrapper_Run_AU3Check=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 6 -q
#Au3Stripper_Parameters=/rm
://////=__=
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

Or, If I move it to the version line....

! Invalid FileVersion value 4=50://////=__=. It will be changed to:50
-> No changes made..

Yes. You are probably right about the AutoItWrapper.  Where should I place this?

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

  • Developers

mmm I see the forum is screwing with my posted code. :)

Lets see if this works without codebox: #AutoIt3Wrapper_Res_Field=Compile Date|%date% %time%

Or quote:

Quote

#AutoIt3Wrapper_Res_Field=Compile Date|%date% %time%

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

Thank you.  This has resolved another issue I had.

But I still want an answer for a question, perhaps best phrased like this: when I build/compile, the EXE can contain a FileVersion, which can be auto updated.  It is written to the source code (and included in the out file).

Is it possible to write the build/compile date to source code as well? 

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

  • Developers

I guess I have lost you as to what you want.  Give me an example script how you use the fileversion information so I understand what you mean.

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

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_type=a3x
#AutoIt3Wrapper_LastBuild=201802192031 <<<<<<<<<<<<<<<<<<<<<<<<<<<<< system updated on build
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <MsgBoxConstants.au3>

MsgBox($MB_SYSTEMMODAL, "Title", "This message box will timeout after 10 seconds or select the OK button.", 10)

I hope this helps.  So whenever I open the source file, I can see when is the last time this source was built. :)

 

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

  • Developers

Sorry but that doesn't make it any clearer for me.
How is the line I posted not right for you? It will write the compile date into the PE header.

Try compiling and running this script:

Quote

#AutoIt3Wrapper_Res_Field=Compile Date|%date% %time%
#AutoIt3Wrapper_Res_FileVersion=1.2.3.4
MsgBox(262144, 'FileGetVersion(@ScriptName):', FileGetVersion(@ScriptName))
MsgBox(262144, 'FileGetVersion(@ScriptName,"Compile Date"):', FileGetVersion(@ScriptName, "Compile Date"))

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

:)

Thank you.

Your code works.  It shows the date in the MsgBox. As expected. :)

However, I would like that date written to the ???.au3 source file. So that when I open the source in my editor (Scite) it is visible there.  Especially when compiling to a3x that date may not be apparent until runtime.

I hope I explained my intention clearly. Thank you for your trouble.

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

  • Developers

Ah, ok... understand now. That function is not build into AutoIt3Wrapper, 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

Hi.

I tried to fill that into AutoIt3Wrapper.ini so I hadn't to write it manually into my scripts:

Field1Name=Compile Date
Field1Value=%date% %time%

But message box shows "%date% %time%" instead of a date and time. Is there a solution for?

Regards, Conrad

SciTE4AutoIt = 3.7.3.0   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win_10   Build = 19044   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE     H:\...\AutoIt3      H:\...\AutoIt3\Include     (H:\ = Network Drive)

   88x31.png  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.

Link to comment
Share on other sites

  • Developers
4 hours ago, Simpel said:

Is there a solution for?

Sure. It is just a matter of running the result of IniRead() through the Func Convert_Variables(). Till now that is only done for Directives, but easy enough to implement for INI defaults. I've updated it for the below fields in the INI in the current available beta of AutoIt3Wrapper:

17.224.935.11 allow for variables (e.g. %date%) in Comment/Description/FieldValue1/FieldValue2

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

Great. With this hint just edited AutoIt3Wrapper.au3.

SciTE4AutoIt = 3.7.3.0   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win_10   Build = 19044   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE     H:\...\AutoIt3      H:\...\AutoIt3\Include     (H:\ = Network Drive)

   88x31.png  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.

Link to comment
Share on other sites

  • Developers
9 hours ago, Simpel said:

Great. With this hint just edited AutoIt3Wrapper.au3.

Did you make more changes than the Beta version, which also should be made in my version? if so, could you share what those changes are?

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

47 minutes ago, Jos said:

Did you make more changes than the Beta version, which also should be made in my version? if so, could you share what those changes are?

I would be also interested to see this answer.

 

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

Hi.

I made a two liner of yours:

$INP_FieldValue1 = Convert_Variables(IniRead($ScriptFile_In & ".ini", "Res", "Field1Value", "")) ; #552
$INP_FieldValue2 = Convert_Variables(IniRead($ScriptFile_In & ".ini", "Res", "Field2Value", "")) ; #554

and a four liner of:

If $INP_FieldValue1 = "" Then $INP_FieldValue1 = Convert_Variables(IniRead($AutoIt3WapperIni, "Res", "Field1Value", "")) ; #595
If $INP_FieldValue2 = "" Then $INP_FieldValue2 = Convert_Variables(IniRead($AutoIt3WapperIni, "Res", "Field2Value", "")) ; #597

I did not:

$INP_Comment = Convert_Variables(IniRead($ScriptFile_In & ".ini", "Res", "Comment", "")) ; #540
$INP_Description = Convert_Variables(IniRead($ScriptFile_In & ".ini", "Res", "Description", "")) ; #541
If $INP_Comment = "" Then $INP_Comment = Convert_Variables(IniRead($AutoIt3WapperIni, "Res", "Comment", "")) ; #583
If $INP_Description = "" Then $INP_Description = Convert_Variables(IniRead($AutoIt3WapperIni, "Res", "Description", "")) ; #584

So I think yours is more complete.

Can you give me a hint (or maybe you did it in the beta already) how the added lines inside AutoIt3Wrapper.ini will appear later inside my au3?

Regards, Conrad

SciTE4AutoIt = 3.7.3.0   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win_10   Build = 19044   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE     H:\...\AutoIt3      H:\...\AutoIt3\Include     (H:\ = Network Drive)

   88x31.png  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.

Link to comment
Share on other sites

  • Developers
1 minute ago, Simpel said:

So I think yours is more complete.

Why not  simply copy my Beta version into the Scite\AutoIt3Wrapper directory?

1 minute ago, Simpel said:

Can you give me a hint (or maybe you did it in the beta already) how the added lines inside AutoIt3Wrapper.ini will appear later inside my au3?

Not sure what you are asking here? Could you explain please?

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

1 minute ago, Jos said:

Why not  simply copy my Beta version into the Scite\AutoIt3Wrapper directory?

As you may remember I did another change due to include stripped and unstripped source: https://www.autoitscript.com/forum/topic/191887-au3stripper-sendto/?do=findComment&comment=1377255

But I think about merging both.

4 minutes ago, Jos said:

Not sure what you are asking here? Could you explain please?

When I compile nearly all defaults I put inside AutoIt3Wrapper.ini then are standing as **** Directives created by AutoIt3Wrapper_GUI **** inside the just compiled script.

Field1Name, Field1Value, Field2Name, Field2Value do not. Run_Au3Stripper=y, Au3Stripper_Parameters=/mo inside wrapper.ini don't appear in actual au3 script after compiling, too. What tool is responsible for that, AutoIt3Wrapper? And how to add all lines giving directives for wrapping inside wrapper.ini after compiling into actual au3 script?

Conrad

SciTE4AutoIt = 3.7.3.0   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win_10   Build = 19044   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE     H:\...\AutoIt3      H:\...\AutoIt3\Include     (H:\ = Network Drive)

   88x31.png  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.

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

×
×
  • Create New...