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


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

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

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

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


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

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


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

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

:)

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

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


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

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 


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


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
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By malicioussoap
      back when I was still doing autohotkey you could write (in code) spanisha::á
      and whenever you were in google docs or notepad you could type (in the document) spanisha  and it instantly turns it into á 
      I tried doing this in autoit, here's what I have so far (my entire code so if this language requires a main function or a return/exit to function properly please let me know):
      ;is this a proper comment? HotKeySet ( "spanisha" , "SendAltered" ) Func SendAltered() Send("á", flag = 0); EndFunc I assume that autoit follows a sort of contemporary hotkey pressing model where you have to hold all keys at the same time? which makes this impossible. So
      I'm wondering if anyone has a workaround for this? or maybe an alternative to HotKeySet()
      I have a vague memory of someone saying that doing something like spanisha:á would work. I don't know if I'm slightly off syntax but this doesn't work.
      Also I tried doing 
      ;is this a proper comment? ;HotKeySet ( "a" , "SendAltered" ) ;spanisha::á Func SendAltered() Send("á"); EndFunc just to try and debug,
      I'm also wondering if my approach is fundamentally wrong since HotKeySet() was made for something like !^A. Or if Send() is syntactically wrong.
      I'm also noticing on these forums that specifying installation is important so to whom it may concern I downloaded both installers, editor and main files. Although I'm about to be real mad if the editor installation makes a difference.
    • By shelly
      I have to press tab to reach a selected button then double click on that
      Here's my script but its not working:
      WinActivate("Policy Decisions -- Webpage Dialog","")
      Sleep(3000)
      Send("{TAB}")
      Send("{TAB}")
      Send("{TAB}")                    // at this point its working according to my need  but double click is not working
      Mouseclick("Left",510, 320, 2, 0)

    • By TheDcoder
      See this thread for info:
    • By nooneclose
      Why can I not click on either of my input fields?
      #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Form1", 730, 437, 192, 124) ;GUISetFont(14, 800, 0, "MS Sans Serif") GUISetBkColor(0xC0DCC0) Global $Label1 = GUICtrlCreateLabel("Enter your Password. UserName is auto filled", 62, 40, 604, 41, $SS_CENTER) GUICtrlSetFont(-1, 26, 800, 0, "MS Sans Serif") Global $Label2 = GUICtrlCreateLabel("User Name:", 120, 130, 604, 31, $SS_LEFT) GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif") Global $Label3 = GUICtrlCreateLabel("Password:", 135, 210, 604, 31, $SS_LEFT) GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif") Global $Input1 = GUICtrlCreateInput(@UserName, 274, 130, 185, 32) GUICtrlSetFont(-1, 14, 800, 1, "MS Sans Serif") Global $Input2 = GUICtrlCreateInput("Password", 274, 210, 185, 32, $ES_PASSWORD) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") Global $OK = GUICtrlCreateButton("OK", 274, 270, 185, 57) GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $OK Global $UserName = GUICtrlRead($Input1) Global $PassWord = GUICtrlRead($Input2) ExitLoop EndSwitch WEnd ; Delete the GUI window GUIDelete()  
    • By cruisepandey
      Hi, 
      I have a string like this : 
      Global $Msga = "urrent directory is /send.  (Submission of file with log number 29381077284 is confirmed)";
      I want to extract the number 29381077284  from the string. I did StringSplit to split based on "(" and then use space to reach there, But it's not a good choice. 
      Can anyone help me with regular expression to find the number from String using AutoIT. TIA
×
×
  • Create New...