Shedunn Posted February 21, 2018 Posted February 21, 2018 I've been looking through some different functions(not sure if that's the right word) to get the Date and time and I can't find one that doesn't include "/ " or ":" in what is returned. I'm trying to create a file name with this format "QuickConfig_MMDDYYYY_HHMM" (doesn't matter if 24 or 12hr format) #include <Date.au3> Func _SaveConfig MouseClick('primary',155, 46, 1, 0) ;clicks save as WinWait('Save bluePRINT Configuration As...','', 4) MouseClick('primary',632, 47, 1, 0) ;clicks the file path bar $Documents = @MyDocumentsDir $FilePath = $Documents & '\BP3 Configs' Send($FilePath) Send('{ENTER}') MouseClick('primary',166, 580, 1, 0) ;clicks file name bar $FileName = 'QuickConfig_' & _NowDate & '_' & _NowTime Send($FileName) Send('{ENTER}') EndFunc I'm wondering if there is a function somewhere to do this?
Moderators JLogan3o13 Posted February 21, 2018 Moderators Posted February 21, 2018 Just use the various macros perhaps? Quote $sFileName = "QuickConfig_" & @MON & @MDAY & @YEAR & "_" & @HOUR & @MIN ConsoleWrite($sFileName & @CRLF) "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Shedunn Posted February 21, 2018 Author Posted February 21, 2018 I just realized the macros existed after reading another post and I tried this $FileName = 'QuickConfig_' & @MDAY & '-' & @MON & '-' & @YEAR & '_' & @HOUR & @MIN Works! Thank you
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