Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Key Stoke To Insert System Time? 2

Status
Not open for further replies.

engmaster

Technical User
Sep 22, 2006
14
US
Does anyone know if there is a key stroke or character map that will insert the system time?

Thanks.
 
Insert it where?

Pressing the F5 key inserts the date and time into Notepad.
 
Insert it anywhere. I was hoping for a map key among the many ALT+# codes that would insert the system time.
 
It's not really a keymap. It's a macro, based on the software using it.

F5 just happens to be the macro for Notepad.



Just my 2¢

"In order to start solving a problem, one must first identify its owner." --Me
--Greg
 
Pleonasm,

(I am only responding because I like your user name):

And the instructions for AutoHotKey to insert:

[li] the current date[/li]

[li] and/or, the current time?[/li]

I have no doubt you could AutoHotKey this, but we all would appreciate more details by you. I suspect you will find this a lot trickier than you might assume.




____________________________
Users Helping Users
 
Bcastner, AutoHotkey has predefined variables for date/time, such as A_YYYY, A_MM, A_DD (year, month, day) and A_Hour, A_Min, A_Sec (hour, minute, second), as well as A_Now which returns YYYYMMDDHHMMSS.

So, a simple two-line AutoHotkey macro to accomplish the task would be:
!::
Send %A_Now%

Now, with this macro active, whenever you press the “!” key, the YYYYMMDDHHMMSS information is inserted into whatever window is active, just as if you had typed it at the keyboard. Of course, you can assign this macro to any key. Additionally, if you wish the date/time information to be formatted differently, then that’s easy to accomplish.

Does this answer the inquiry?
 
YYYYMMDDHHMMSS
Is more than what was asked.

It was the parsing of the NOW() function that led me to ask you to do a little more work for the original poster.

As you rightly noted, this would invovle a SEND macro, using the inbuilt functions: A_Hour, A_Min, A_Sec

I too am a fan of AutoHotKey.

A star for you sir,

Best.
Bill Castner


____________________________
Users Helping Users
 
Thanks Pleonasm. This is definitely what I was looking for.

One more question though:
I have a digital camera that automatically names the picture files xxx001, xxx002, etc. Can this program rename a file to reflect the date and time created?
For example: rename "xxx001.jpg" to "YYMMDDHHMMSS.jpg"

And yes... a star for you.
Thanks again.
 
engmaster
Try Google Picasso, it is free, I use it for my digital pictures. It allows you to highlight and batch name as many photos as you like in one action. For example, when I have a batch of photos from a place that I have visited, say London, you just edit the name by adding London and it then adds the date and time contained within the image so each image has the name London followed by the date and time. I find this makes filing my photos in a recognisable manner much easier than relying on the camera image ID.

toolman59
 
Have a look at Rename Master...

"Rename Master is a FREE utility for renaming large groups of files with a few clicks. Anyone that has worked with websites, file archives, or collections of music, videos, or pictures has probably spent way too much time renaming hundreds of files.

This utility will add, remove, or replace parts of the filename with ease and also supports renaming via file properties, MP3 tags, JPEG JFIF and EXIF tags. Batch renaming that's simple to use, yet still very powerful."

It doesn't need to be installed (so can be carried round on a USB stick) and is available from
Hope this helps...
 
Thanks all. I think I will use Google Picasa. Really like the interface.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top