Jump to content

Recommended Posts

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

://////=__=

Jos

Edited by Jos

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


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

Share this post


Link to post
Share on other sites

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

Share this post


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

Share this post


Link to post
Share on other sites

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

Share this post


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

Share this post


Link to post
Share on other sites

Ah, ok... understand now. That function is not build into AutoIt3Wrapper, sorry.  

Jos

Share this post


Link to post
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 = Win7Pro SP1   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.

Share this post


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

Share this post


Link to post
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 = Win7Pro SP1   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.

Share this post


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

Share this post


Link to post
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:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest beginning - communication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for 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 *

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 * 

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 TaskScheduler

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 *

"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: 2019-10-01

Share this post


Link to post
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 = Win7Pro SP1   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.

Share this post


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

Share this post


Link to post
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 = Win7Pro SP1   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.

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 v120
      Rapid Fire Mouse Hack Script
      *snip*
       
    • By nooneclose
      Good morning, I am trying to figure out if it is possible to check if these invoice lines exist or not. 
      Here are the table and column name: INVOICELINE.INVOICELINENUM (a required field if created)
      Here is a picture of what I am talking about. (Do not worry about security. the picture is from a demo test site so all information is fake)
       
      is there any way to check if these fields exist or not? (they do not exist unless the user clicks on "New Row")
      Example: line 11 does not exist right now. How would I go about to see if it did or not? 
      This is what I have so far:
      SELECT DISTINCT iv.invoicenum, iv.description FROM invoice AS iv JOIN invoiceline AS ivl ON iv.invoicenum = ivl.invoicenum AND iv.siteid = ivl.siteid /* = 'nothing' and yet somehow not null? */ WHERE iv.invoicenum NOT IN (SELECT invoicelinenum FROM invoiceline WHERE invoicelinenum IS NOT NULL) I get 0 results where I should get more than 0. 
    • By Kruxe
      Hello Everyone,
      I am very green when it comes to AutoIT, I have recently started using it to automate a job that i perform using MS Excel and that is working great. Recently I have been faced with a challenge I which i need to copy a specific set of lines from one .txt file and past them, overwriting a specific set of lines in a different .txt file. I honestly have no clue how I can copy the specified lines and transfer them. What functions / commands could I use and how could I lay them out I AutoIT? Any and all help will be appreciated. 
      Thanks!
      Kruxe
    • By Saravanan2213
      Hi everyone,
      i just need your help. i have script for cleaning browsing history and other unwanted file but the problem is i don't want to see the GUI i have attached below. It should not show anything on the screen. is it possible to do it in autoit. thanks in advance.
       
      So for i have tried flag
      Run("rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 255", "", @SW_HIDE)
      @SW_DISABLE
       
      Looking forward your help.........

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