Diana (Cda) 1 Posted September 27, 2007 I found _NowTime() in the help file but it gives the exact format seen in regional settings. Unfortunately, filenames won't take colons ":" so was hoping to change the script to give me results that will work in filenames. ; ; AutoIt v3.0 ; SoundPlay (@ScriptDir & "\WAVS\Robotz Menu Popup.wav") #include <date.au3> $thisday = StringMid("Sn,Mn,Tu,Wd,Th,Fr,Sa", StringInStr("SunMonTueWedThuFriSat", _DateDayOfWeek(@WDAY,1) ), 2) ClipPut(@YEAR & '.' & @MON & '.' & @MDAY & '.' & $thisday & ", " & _NowTime()) Sleep(500) Exit ; finished This gives me this type of format in the time part: 16:47 Is there a way to get it instead to show up as 16h47, in 24-hour format with an "h" as separator instead of ":" (as per the French system)? Thanks. Share this post Link to post Share on other sites
james3mg 1 Posted September 27, 2007 I found _NowTime() in the help file but it gives the exact format seen in regional settings. Unfortunately, filenames won't take colons ":" so was hoping to change the script to give me results that will work in filenames. ; ; AutoIt v3.0 ; SoundPlay (@ScriptDir & "\WAVS\Robotz Menu Popup.wav") #include <date.au3> $thisday = StringMid("Sn,Mn,Tu,Wd,Th,Fr,Sa", StringInStr("SunMonTueWedThuFriSat", _DateDayOfWeek(@WDAY,1) ), 2) ClipPut(@YEAR & '.' & @MON & '.' & @MDAY & '.' & $thisday & ", " & _NowTime()) Sleep(500) Exit ; finished This gives me this type of format in the time part: 16:47 Is there a way to get it instead to show up as 16h47, in 24-hour format with an "h" as separator instead of ":" (as per the French system)? Thanks. StringReplace("16:47",":","h")? That's the easy way... "There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110 Share this post Link to post Share on other sites
Jos 2,275 Posted September 27, 2007 - or simply use @Hour & "h" & @Min 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
Diana (Cda) 1 Posted September 28, 2007 - or simply use @Hour & "h" & @MinOh, man, that's embarrassing. How simple. And yet I looked and looked in the help file <lol>. Well, it's a great script now. Here is what it looks like: ; ; AutoIt v3.0 ; SoundPlay (@ScriptDir & "\WAVS\Robotz Menu Popup.wav") #include <date.au3> $thisday = StringMid("Sn,Mn,Tu,Wd,Th,Fr,Sa", StringInStr("SunMonTueWedThuFriSat", _DateDayOfWeek(@WDAY,1) ), 2) ClipPut(@YEAR & '.' & @MON & '.' & @MDAY & '.' & $thisday & ", " & @Hour & "h" & @Min) Exit ; finished So whenever I need to append the date/time to any backup files I have, I used a compiled version of this script and I name files/folders with the resulting text string and this date/time format keeps them all properly sorted. Thanks! Share this post Link to post Share on other sites