cramaboule Posted May 16, 2022 Share Posted May 16, 2022 Hello, I was wondering if there is a possibility to add timestamp or text when compiling the au3 file. for instance to have the time compile somewhere in my au3 file? Thanks in advance Cramaboule My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
rudi Posted May 16, 2022 Share Posted May 16, 2022 SciTE compiler GUI, TAB "run before/after": Some arrangement to add a "timestamp-line" at the end or beginning of your AU3 file argumentum 1 Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
cramaboule Posted May 16, 2022 Author Share Posted May 16, 2022 Yes Indeed, I thought about it, but how ? I haven't a clear idea. My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
Developers Jos Posted May 16, 2022 Developers Share Posted May 16, 2022 (edited) When you have the Full SciTE4AutoIt3 installed you have this option: Quote ; free form resource fields ... max 15; you can use the following variables:; %AutoItVer% which will be replaced with the version of AutoIt3; %date% = PC date in short date format; %longdate% = PC date in long date format; %time% = PC timeformat; eg: #AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%#AutoIt3Wrapper_Res_Field= ;Free format fieldname|fieldvalue .. which can add an additional field to the PE header which you can see when opening the properties of the compiled script. Edited May 16, 2022 by Jos Exit 1 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 More sharing options...
Exit Posted May 16, 2022 Share Posted May 16, 2022 the op wants the information in the au3 file, not in the exe file. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Developers Jos Posted May 16, 2022 Developers Share Posted May 16, 2022 In that case one can write a script to do so and add that to the script to runbefore/after via a directive. One just needs to use their imagination! Exit and cramaboule 2 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 More sharing options...
Musashi Posted May 16, 2022 Share Posted May 16, 2022 3 hours ago, cramaboule said: I haven't a clear idea. Just as an inspiration (there might be simpler ways to solve the problem by now 🤔) : 1. created by @BugFix in 2011 : time-stamp-and-small-version-backup-management 2. also from BugFix (2021) : timestamp-versionierung (Description only in german) "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Developers Jos Posted May 16, 2022 Developers Share Posted May 16, 2022 (edited) Timestamp versioning (as in setting the version directive) can also be done with a template directive in the standard functionality. 😉 Edited May 16, 2022 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 More sharing options...
cramaboule Posted May 24, 2022 Author Share Posted May 24, 2022 I came up with this: expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Run_Before=test-timestamp.exe %in% #AutoIt3Wrapper_Run_Tidy=y #Au3Stripper_Parameters=/mo #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Region ;Timestamp ===================== # 2022/05/24 14:29:20 #EndRegion ;Timestamp ===================== #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.16.0 Author: Marc Arm Script Function: Time stamp in prg #ce ---------------------------------------------------------------------------- #include <MsgBoxConstants.au3> #include <File.au3> #include <Date.au3> #include <Array.au3> Dim $aFile If $CmdLine[0] = 1 Then $sFile = $CmdLine[1] If StringRight($sFile, 4) <> '.au3' Then MsgBox($MB_OK + $MB_ICONERROR, 'Error', 'Error, wrong file input' & @CRLF & 'Must be "*.au3"', 3) EndIf Else MsgBox($MB_OK + $MB_ICONERROR, 'Error', 'Error, no file input', 3) Exit EndIf _FileReadToArray($sFile, $aFile, 1) For $i = 1 To $aFile[0] If StringRegExp($aFile[$i], "^#EndRegion") Then $nLine = $i ExitLoop EndIf Next If StringRegExp($aFile[$nLine + 1], "^#Region ;Timestamp") Then _FileWriteToLine($sFile, $nLine + 2, "# " & _NowCalc(), True, True) Else _ArrayInsert($aFile, $nLine + 1, "#Region ;Timestamp =====================") _ArrayInsert($aFile, $nLine + 2, "# " & _NowCalc()) $aFile[0] = _ArrayInsert($aFile, $nLine + 3, "#EndRegion ;Timestamp =====================") _FileWriteFromArray($sFile, $aFile, 1) EndIf C. My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now