Add current date to log file

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
hracer75
Posts: 19
Joined: 19 Dec 2016, 23:52

Add current date to log file

24 Apr 2018, 13:30

Hello. I am trying to add a date to the output of my tool. I have my tool send the info into a log file and to the clipboard. What I want to do is add a current date to each saved entry in the log file. The clipboard does not need it. I have looked around, but I am not finding it. Below is what it looks like and what I want it to look like. Thanks for any help.

Currently:

NT @CA ATS::

Tech Name: Name Tech ID: ID Tech CBR: 1234567890

*** Remarks: remark go here

___________________

Vnet #: 12345678
CU BTN: 0987654321
CU USI: 123456789012

****************************************

Would Like:

Date: 4/24/18
NT @CA ATS::

Tech Name: Name Tech ID: ID Tech CBR: 1234567890

*** Remarks: remark go here

___________________

Vnet #: 12345678
CU BTN: 0987654321
CU USI: 123456789012

****************************************


Code: Select all

;;;;;;;;;;;;;;;;;;;;;;;;;;HEADER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Name .........: My Notmaker v3.1
; Description ..: A Notmaker that will sent info to a log file and send to clipboard for pasting to notes, ticket etc..
; Language .....: English (en-US)
; Author .......: M R	
; Created .....: 4/1/2018
; Filename .....: MYNMv3.1.ahk
;;;;;;;;;;;;;;;;;;;;;;;Changelog;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 4/13/2018 added stopwatch
; 		    working so far
; 4/14/2018 added name of app to title.
; 4/14/2018 changed font size of stopwatch
; 4/22/2018 Added ",%A_MyDocuments%\TESTLOG.txt" to end of fileappend
; 4/24/2018 trying to add a date stamp for each log entry
; 
;;;;;;;;;;;;;;;;;StopWatch Special Instructions;;;;;;;;;;;;;;;;;

SetBatchLines, -1
; Some variables
ElapsedTime := A_YYYY                                 ; initialize ElapsedTime, it will be treated as YYYY0101000000
BalanceTime := 0                                      ; initialize BalanceTime (time not counted yet)

;;;;;;;;;;;;;;;;;;;;;;;;;;Main GUI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Gui, Color, gray                                      ; Color of GUI background

;---------------------------------------------------------------
Gui, font, s14 bold	cred
Gui, Add, Text,, Greeting Message Here
Gui, font
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x6 y74, Tech Name: 
Gui, font, s10 norm
Gui, Add, Edit, x92 y70 w230 h25 vone 
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x28 y108, Tech ID: 
Gui, font, s10 norm	
Gui, Add, Edit, x92 y104 w230 h25 vtwo
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x13 y142, Tech CBR: 
Gui, font, s10 norm	
Gui, Add, Edit, x92 y138 w230 h25 vthree
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x40 y176, Vnet #: 
Gui, font, s10 norm	
Gui, Add, Edit, x92 y172 w230 h25 vfour
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x27 y210, CU BTN: 
Gui, font, s10 norm		
Gui, Add, Edit, x92 y206 w230 h25 vfive
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x32 y244, CU USI: 
Gui, font, s10 norm		
Gui, Add, Edit, x92 y240 w230 h25 vsix
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x22 y278, Remarks: 
Gui, font, s10 norm		
Gui, Add, Edit, x92 y274 w340 h200 vseven
;---------------------------------------------------------------
Gui, Add, Button, default, SUBMIT                                      ; Submit button will send to clipboard and log file
Gui, Show, w450 h680                			                       ; Size of GUI window
Gui, Show, , My NoteMakr v3.1                                   ; Name showing in Title of GUI

;;;;;;;;;;;;;;;;;;;;;;;;;StopWatch GUI;;;;;;;;;;;;;;;;;;;;;;;;;;

Gui, Add, Text,                                      				   ; added line space
Gui, Font, S24 CDefault Bold, Verdana
Gui, Add, Text, x+50 vDisplayTime, 00:00
Gui, Font, S12, Verdana
Gui, Add, Text, 
Gui, Add, Button, x+0 yp w80 h30 vBtnStartStop gStartStop Default, Start
Gui, Add, Button, x+2 yp w80 h30 vBtnReset gReset, Reset

;;;;;;;;;;;;;;;;;;;;;;;;;;Author INFO;;;;;;;;;;;;;;;;;;;;;;;;;;;

Gui, font, s10 bold
Gui, Add, Text, x300 y660, Created: by M R                          ; author note on GUI
Gui, font

Return

;;;;;;;;;;;;;;;;;;;;;;StopWatch FUNCTIONS;;;;;;;;;;;;;;;;;;;;;;;

; BtnStartStop label
StartStop:
   GuiControlGet, BtnStartStop                        ; get the caption of the button
   If (BtnStartStop = "Start") {                      ; if it is "Start"
      StartTickCount := A_TickCount - BalanceTime     ;    initialize StartTickCount
      SetTimer, StopWatch, 10                         ;    start the timer called every 10 ms to be accurate
      GuiControl, , BtnStartStop, Stop                ;    set the caption to Stop
   } Else {                                           ; it should be "Stop"
      BalanceTime := A_TickCount - StartTickCount     ;    memorize the balance time not counted yet
      SetTimer, StopWatch, Off                        ;    stop the timer
      GuiControl, , BtnStartStop, Start               ;    set the caption to "Start"
   }
Return
; BtnReset label
Reset:
   SetTimer, StopWatch, Off                           ; stop the timer
   GuiControl, , BtnStartStop, Start                  ; set the caption of BtnStartStop to "Start"
   GuiControl, , DisplayTime, 00:00                   ; initialize DisplayTime
   ElapsedTime := A_YYYY                              ; initialize ElapsedTime, it will be treated as YYYY0101000000
   BalanceTime := 0                                   ; initialize BalanceTime
   GuiControl, Focus, BtnStartStop                    ; set the focus on BtnStartStop
   GuiControl, -Default, BtnReset                     ; remove the BS_DEFPUSHBUTTON (default) style
   GuiControl, +Default, BtnStartStop                 ; set the BS_DEFPUSHBUTTON (default) style
Return
; Timer routine
StopWatch:
   If ((A_TickCount - StartTickCount) >= 1000) {      ; if current tickcount - StartTickCount >= 1000 (i.e. 1 second)
      StartTickCount += 1000                          ;    add 1000 ms (1 second) to StartTickCount
      ElapsedTime += 1, S                             ;    add 1 second to ElapsedTime
      FormatTime, DisplayTime, %ElapsedTime%, mmm:ss   ;    format ElapsedTime to mmm:ss
      GuiControl, , DisplayTime, %DisplayTime%        ;    update DisplayTime
   }
Return

;;;;;;;;;;;;;;;;;;;;;;;;StopWatch FUNCTIONS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ButtonSUBMIT:  ; Submit Button to log file in sam directory of app
Gui, Submit, NoHide

;;;;;;;;;;;;;;;;;;;;;;;;NT Online Notmaker FUNCTIONS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

FileCreateDir, %A_MyDocuments%\my-logs			; This will create the folder in my documents folder under the current user login

FileAppend, NT @CA ATS:: `n`nTech Name: %one% Tech ID: %two% Tech CBR: %three%`n`n*** Remarks: %seven%`n`n___________________`n`nVnet #: %four%`nCU BTN: %five%`nCU USI: %six%`n`n****************************************`n`n,%A_MyDocuments%\my-logs\mynotelog.txt										; ",%A_MyDocuments%\ntcalllog\ntcalls.txt" is the file location after the folder is created. 

clipboard = NT @CA ATS:: `n`nTech Name: %one% Tech ID: %two% Tech CBR: %three%`n`n*** Remarks: %seven%`n`n___________________`n`nVnet #: %four%`nCU BTN: %five%`nCU USI: %six%`n`n****************************************`n`n

Loop, 7
  GuiControl,,Edit%A_index%,
Return

^SPACE::  Winset, Alwaysontop, , A

GuiClose: ; Will close app out
ExitApp 
ChurchGoer

Re: Add current date to log file

24 Apr 2018, 14:33

hracer75 wrote:Hello. I am trying to add a date to the output of my tool. I have my tool send the info into a log file and to the clipboard. What I want to do is add a current date to each saved entry in the log file. The clipboard does not need it. I have looked around, but I am not finding it. Below is what it looks like and what I want it to look like. Thanks for any help.

Currently:

NT @CA ATS::

Tech Name: Name Tech ID: ID Tech CBR: 1234567890

*** Remarks: remark go here

___________________

Vnet #: 12345678
CU BTN: 0987654321
CU USI: 123456789012

****************************************

Would Like:

Date: 4/24/18
NT @CA ATS::

Tech Name: Name Tech ID: ID Tech CBR: 1234567890

*** Remarks: remark go here

___________________

Vnet #: 12345678
CU BTN: 0987654321
CU USI: 123456789012

****************************************


Code: Select all

;;;;;;;;;;;;;;;;;;;;;;;;;;HEADER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Name .........: My Notmaker v3.1
; Description ..: A Notmaker that will sent info to a log file and send to clipboard for pasting to notes, ticket etc..
; Language .....: English (en-US)
; Author .......: M R	
; Created .....: 4/1/2018
; Filename .....: MYNMv3.1.ahk
;;;;;;;;;;;;;;;;;;;;;;;Changelog;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 4/13/2018 added stopwatch
; 		    working so far
; 4/14/2018 added name of app to title.
; 4/14/2018 changed font size of stopwatch
; 4/22/2018 Added ",%A_MyDocuments%\TESTLOG.txt" to end of fileappend
; 4/24/2018 trying to add a date stamp for each log entry
; 
;;;;;;;;;;;;;;;;;StopWatch Special Instructions;;;;;;;;;;;;;;;;;

SetBatchLines, -1
; Some variables
ElapsedTime := A_YYYY                                 ; initialize ElapsedTime, it will be treated as YYYY0101000000
BalanceTime := 0                                      ; initialize BalanceTime (time not counted yet)

;;;;;;;;;;;;;;;;;;;;;;;;;;Main GUI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Gui, Color, gray                                      ; Color of GUI background

;---------------------------------------------------------------
Gui, font, s14 bold	cred
Gui, Add, Text,, Greeting Message Here
Gui, font
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x6 y74, Tech Name: 
Gui, font, s10 norm
Gui, Add, Edit, x92 y70 w230 h25 vone 
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x28 y108, Tech ID: 
Gui, font, s10 norm	
Gui, Add, Edit, x92 y104 w230 h25 vtwo
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x13 y142, Tech CBR: 
Gui, font, s10 norm	
Gui, Add, Edit, x92 y138 w230 h25 vthree
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x40 y176, Vnet #: 
Gui, font, s10 norm	
Gui, Add, Edit, x92 y172 w230 h25 vfour
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x27 y210, CU BTN: 
Gui, font, s10 norm		
Gui, Add, Edit, x92 y206 w230 h25 vfive
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x32 y244, CU USI: 
Gui, font, s10 norm		
Gui, Add, Edit, x92 y240 w230 h25 vsix
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x22 y278, Remarks: 
Gui, font, s10 norm		
Gui, Add, Edit, x92 y274 w340 h200 vseven
;---------------------------------------------------------------
Gui, Add, Button, default, SUBMIT                                      ; Submit button will send to clipboard and log file
Gui, Show, w450 h680                			                       ; Size of GUI window
Gui, Show, , My NoteMakr v3.1                                   ; Name showing in Title of GUI

;;;;;;;;;;;;;;;;;;;;;;;;;StopWatch GUI;;;;;;;;;;;;;;;;;;;;;;;;;;

Gui, Add, Text,                                      				   ; added line space
Gui, Font, S24 CDefault Bold, Verdana
Gui, Add, Text, x+50 vDisplayTime, 00:00
Gui, Font, S12, Verdana
Gui, Add, Text, 
Gui, Add, Button, x+0 yp w80 h30 vBtnStartStop gStartStop Default, Start
Gui, Add, Button, x+2 yp w80 h30 vBtnReset gReset, Reset

;;;;;;;;;;;;;;;;;;;;;;;;;;Author INFO;;;;;;;;;;;;;;;;;;;;;;;;;;;

Gui, font, s10 bold
Gui, Add, Text, x300 y660, Created: by M R                          ; author note on GUI
Gui, font

Return

;;;;;;;;;;;;;;;;;;;;;;StopWatch FUNCTIONS;;;;;;;;;;;;;;;;;;;;;;;

; BtnStartStop label
StartStop:
   GuiControlGet, BtnStartStop                        ; get the caption of the button
   If (BtnStartStop = "Start") {                      ; if it is "Start"
      StartTickCount := A_TickCount - BalanceTime     ;    initialize StartTickCount
      SetTimer, StopWatch, 10                         ;    start the timer called every 10 ms to be accurate
      GuiControl, , BtnStartStop, Stop                ;    set the caption to Stop
   } Else {                                           ; it should be "Stop"
      BalanceTime := A_TickCount - StartTickCount     ;    memorize the balance time not counted yet
      SetTimer, StopWatch, Off                        ;    stop the timer
      GuiControl, , BtnStartStop, Start               ;    set the caption to "Start"
   }
Return
; BtnReset label
Reset:
   SetTimer, StopWatch, Off                           ; stop the timer
   GuiControl, , BtnStartStop, Start                  ; set the caption of BtnStartStop to "Start"
   GuiControl, , DisplayTime, 00:00                   ; initialize DisplayTime
   ElapsedTime := A_YYYY                              ; initialize ElapsedTime, it will be treated as YYYY0101000000
   BalanceTime := 0                                   ; initialize BalanceTime
   GuiControl, Focus, BtnStartStop                    ; set the focus on BtnStartStop
   GuiControl, -Default, BtnReset                     ; remove the BS_DEFPUSHBUTTON (default) style
   GuiControl, +Default, BtnStartStop                 ; set the BS_DEFPUSHBUTTON (default) style
Return
; Timer routine
StopWatch:
   If ((A_TickCount - StartTickCount) >= 1000) {      ; if current tickcount - StartTickCount >= 1000 (i.e. 1 second)
      StartTickCount += 1000                          ;    add 1000 ms (1 second) to StartTickCount
      ElapsedTime += 1, S                             ;    add 1 second to ElapsedTime
      FormatTime, DisplayTime, %ElapsedTime%, mmm:ss   ;    format ElapsedTime to mmm:ss
      GuiControl, , DisplayTime, %DisplayTime%        ;    update DisplayTime
   }
Return

;;;;;;;;;;;;;;;;;;;;;;;;StopWatch FUNCTIONS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ButtonSUBMIT:  ; Submit Button to log file in sam directory of app
Gui, Submit, NoHide

;;;;;;;;;;;;;;;;;;;;;;;;NT Online Notmaker FUNCTIONS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

FileCreateDir, %A_MyDocuments%\my-logs			; This will create the folder in my documents folder under the current user login

FileAppend, NT @CA ATS:: `n`nTech Name: %one% Tech ID: %two% Tech CBR: %three%`n`n*** Remarks: %seven%`n`n___________________`n`nVnet #: %four%`nCU BTN: %five%`nCU USI: %six%`n`n****************************************`n`n,%A_MyDocuments%\my-logs\mynotelog.txt										; ",%A_MyDocuments%\ntcalllog\ntcalls.txt" is the file location after the folder is created. 

clipboard = NT @CA ATS:: `n`nTech Name: %one% Tech ID: %two% Tech CBR: %three%`n`n*** Remarks: %seven%`n`n___________________`n`nVnet #: %four%`nCU BTN: %five%`nCU USI: %six%`n`n****************************************`n`n

Loop, 7
  GuiControl,,Edit%A_index%,
Return

^SPACE::  Winset, Alwaysontop, , A

GuiClose: ; Will close app out
ExitApp
try this code line 129 is main change and see TimeFormat command to change how you want the format to be

Code: Select all

;;;;;;;;;;;;;;;;;;;;;;;;;;HEADER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Name .........: My Notmaker v3.1
; Description ..: A Notmaker that will sent info to a log file and send to clipboard for pasting to notes, ticket etc..
; Language .....: English (en-US)
; Author .......: M R	
; Created .....: 4/1/2018
; Filename .....: MYNMv3.1.ahk
;;;;;;;;;;;;;;;;;;;;;;;Changelog;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 4/13/2018 added stopwatch
; 		    working so far
; 4/14/2018 added name of app to title.
; 4/14/2018 changed font size of stopwatch
; 4/22/2018 Added ",%A_MyDocuments%\TESTLOG.txt" to end of fileappend
; 4/24/2018 trying to add a date stamp for each log entry
; 
;;;;;;;;;;;;;;;;;StopWatch Special Instructions;;;;;;;;;;;;;;;;;

SetBatchLines, -1
; Some variables
ElapsedTime := A_YYYY                                 ; initialize ElapsedTime, it will be treated as YYYY0101000000
BalanceTime := 0                                      ; initialize BalanceTime (time not counted yet)

;;;;;;;;;;;;;;;;;;;;;;;;;;Main GUI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Gui, Color, gray                                      ; Color of GUI background

;---------------------------------------------------------------
Gui, font, s14 bold	cred
Gui, Add, Text,, Greeting Message Here
Gui, font
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x6 y74, Tech Name: 
Gui, font, s10 norm
Gui, Add, Edit, x92 y70 w230 h25 vone 
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x28 y108, Tech ID: 
Gui, font, s10 norm	
Gui, Add, Edit, x92 y104 w230 h25 vtwo
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x13 y142, Tech CBR: 
Gui, font, s10 norm	
Gui, Add, Edit, x92 y138 w230 h25 vthree
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x40 y176, Vnet #: 
Gui, font, s10 norm	
Gui, Add, Edit, x92 y172 w230 h25 vfour
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x27 y210, CU BTN: 
Gui, font, s10 norm		
Gui, Add, Edit, x92 y206 w230 h25 vfive
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x32 y244, CU USI: 
Gui, font, s10 norm		
Gui, Add, Edit, x92 y240 w230 h25 vsix
;---------------------------------------------------------------
Gui, font, s10 bold
Gui, Add, Text, x22 y278, Remarks: 
Gui, font, s10 norm		
Gui, Add, Edit, x92 y274 w340 h200 vseven
;---------------------------------------------------------------
Gui, Add, Button, default, SUBMIT                                      ; Submit button will send to clipboard and log file
Gui, Show, w450 h680                			                       ; Size of GUI window
Gui, Show, , My NoteMakr v3.1                                   ; Name showing in Title of GUI

;;;;;;;;;;;;;;;;;;;;;;;;;StopWatch GUI;;;;;;;;;;;;;;;;;;;;;;;;;;

Gui, Add, Text,                                      				   ; added line space
Gui, Font, S24 CDefault Bold, Verdana
Gui, Add, Text, x+50 vDisplayTime, 00:00
Gui, Font, S12, Verdana
Gui, Add, Text, 
Gui, Add, Button, x+0 yp w80 h30 vBtnStartStop gStartStop Default, Start
Gui, Add, Button, x+2 yp w80 h30 vBtnReset gReset, Reset

;;;;;;;;;;;;;;;;;;;;;;;;;;Author INFO;;;;;;;;;;;;;;;;;;;;;;;;;;;

Gui, font, s10 bold
Gui, Add, Text, x300 y660, Created: by M R                          ; author note on GUI
Gui, font

Return

;;;;;;;;;;;;;;;;;;;;;;StopWatch FUNCTIONS;;;;;;;;;;;;;;;;;;;;;;;

; BtnStartStop label
StartStop:
   GuiControlGet, BtnStartStop                        ; get the caption of the button
   If (BtnStartStop = "Start") {                      ; if it is "Start"
      StartTickCount := A_TickCount - BalanceTime     ;    initialize StartTickCount
      SetTimer, StopWatch, 10                         ;    start the timer called every 10 ms to be accurate
      GuiControl, , BtnStartStop, Stop                ;    set the caption to Stop
   } Else {                                           ; it should be "Stop"
      BalanceTime := A_TickCount - StartTickCount     ;    memorize the balance time not counted yet
      SetTimer, StopWatch, Off                        ;    stop the timer
      GuiControl, , BtnStartStop, Start               ;    set the caption to "Start"
   }
Return
; BtnReset label
Reset:
   SetTimer, StopWatch, Off                           ; stop the timer
   GuiControl, , BtnStartStop, Start                  ; set the caption of BtnStartStop to "Start"
   GuiControl, , DisplayTime, 00:00                   ; initialize DisplayTime
   ElapsedTime := A_YYYY                              ; initialize ElapsedTime, it will be treated as YYYY0101000000
   BalanceTime := 0                                   ; initialize BalanceTime
   GuiControl, Focus, BtnStartStop                    ; set the focus on BtnStartStop
   GuiControl, -Default, BtnReset                     ; remove the BS_DEFPUSHBUTTON (default) style
   GuiControl, +Default, BtnStartStop                 ; set the BS_DEFPUSHBUTTON (default) style
Return
; Timer routine
StopWatch:
   If ((A_TickCount - StartTickCount) >= 1000) {      ; if current tickcount - StartTickCount >= 1000 (i.e. 1 second)
      StartTickCount += 1000                          ;    add 1000 ms (1 second) to StartTickCount
      ElapsedTime += 1, S                             ;    add 1 second to ElapsedTime
      FormatTime, DisplayTime, %ElapsedTime%, mmm:ss   ;    format ElapsedTime to mmm:ss
      GuiControl, , DisplayTime, %DisplayTime%        ;    update DisplayTime
   }
Return

;;;;;;;;;;;;;;;;;;;;;;;;StopWatch FUNCTIONS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ButtonSUBMIT:  ; Submit Button to log file in sam directory of app
Gui, Submit, NoHide
FormatTime, GurlBye, R
;;;;;;;;;;;;;;;;;;;;;;;;NT Online Notmaker FUNCTIONS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

FileCreateDir, %A_MyDocuments%\my-logs			; This will create the folder in my documents folder under the current user login

FileAppend, %GurlBye%`nNT @CA ATS:: `n`nTech Name: %one% Tech ID: %two% Tech CBR: %three%`n`n*** Remarks: %seven%`n`n___________________`n`nVnet #: %four%`nCU BTN: %five%`nCU USI: %six%`n`n****************************************`n`n,%A_MyDocuments%\my-logs\mynotelog.txt										; ",%A_MyDocuments%\ntcalllog\ntcalls.txt" is the file location after the folder is created. 

clipboard = %GurlBye%`nNT @CA ATS:: `n`nTech Name: %one% Tech ID: %two% Tech CBR: %three%`n`n*** Remarks: %seven%`n`n___________________`n`nVnet #: %four%`nCU BTN: %five%`nCU USI: %six%`n`n****************************************`n`n

Loop, 7
  GuiControl,,Edit%A_index%,
Return

^SPACE::  Winset, Alwaysontop, , A

GuiClose: ; Will close app out
ExitApp 
hracer75
Posts: 19
Joined: 19 Dec 2016, 23:52

Re: Add current date to log file

24 Apr 2018, 14:53

Thanks. I did just find a way. Thank you for the help still.


Before:

Code: Select all

FileAppend, NT @CA ATS:: `n`nTech Name: %one% Tech ID: %two% Tech CBR: %three%`n`n*** Remarks: %seven%`n`n___________________`n`nVnet #: %four%`nCU BTN: %five%`nCU USI: %six%`n`n****************************************`n`n,%A_MyDocuments%\my-logs\mynotelog.txt
After

Code: Select all

FileAppend, %A_MM%/%A_DD%/%A_YYYY%`n`nNT @CA ATS:: `n`nTech Name: %one% Tech ID: %two% Tech CBR: %three%`n`n*** Remarks: %seven%`n`n___________________`n`nVnet #: %four%`nCU BTN: %five%`nCU USI: %six%`n`n****************************************`n`n,%A_MyDocuments%\my-logs\mynotelog.txt

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput and 317 guests