Capture Date/Time for Pasting into Application

M

magmike

I type date and time all day long into various programs to mark notes.
Is there a way in Windows XP or a tool that anyone knows of where I
would be able to use keystrokes (i.e. CTRL+SHIFT+D) to automatically
insert the date and time into the active application at the cursors
location?

Thanks in advance for your help,

magmike
 
P

Patok

magmike said:
I type date and time all day long into various programs to mark notes.
Is there a way in Windows XP or a tool that anyone knows of where I
would be able to use keystrokes (i.e. CTRL+SHIFT+D) to automatically
insert the date and time into the active application at the cursors
location?

I don't know about a tool, but you can use a small VBscript to do
it. Create a text file, paste the following script into it, and save
it as a .vbs file, for example DaTime.vbs

Dim MyTime
Dim MyDate
MyTime = Time
MyDate = Date
Dim Wsh
Set Wsh = Wscript.CreateObject("Wscript.Shell")
Wsh.SendKeys Date&" "&Time


Then, create a shortcut to the script file *on the desktop* (that's
important). Edit the properties of the shortcut, and into the field
for "Shortcut key" press the key combination you want (i.e.
CTRL+SHIFT+D) or whatever. Press OK. :) That's it.

Now, whenever you press the key combination, it will paste the date
and time into the current active window.

Like this: 2011-08-12 00:12:45 (I just pressed it while editing the
message.)

If you don't like the format, or want to add other stuff to the
string, just edit what SendKeys sends. In my script, it is the date, a
space, and the time, in the current system format. Of course you'll
need to have VBscript installed, but I think it would be highly
unusual if you didn't.
 
P

Patok

Patok said:
I don't know about a tool, but you can use a small VBscript to do it.
Create a text file, paste the following script into it, and save it as a
.vbs file, for example DaTime.vbs

Dim MyTime
Dim MyDate
MyTime = Time
MyDate = Date
Dim Wsh
Set Wsh = Wscript.CreateObject("Wscript.Shell")
Wsh.SendKeys Date&" "&Time


Then, create a shortcut to the script file *on the desktop* (that's
important). Edit the properties of the shortcut, and into the field for
"Shortcut key" press the key combination you want (i.e. CTRL+SHIFT+D) or
whatever. Press OK. :) That's it.

Now, whenever you press the key combination, it will paste the date and
time into the current active window.

Like this: 2011-08-12 00:12:45 (I just pressed it while editing the
message.)

If you don't like the format, or want to add other stuff to the string,
just edit what SendKeys sends. In my script, it is the date, a space,
and the time, in the current system format. Of course you'll need to
have VBscript installed, but I think it would be highly unusual if you
didn't.

I mean you need Windows Scripting host; the file is wscript.exe in
system32. In any event, it would be unusual to not have it.
 
D

dadiOH

magmike said:
I type date and time all day long into various programs to mark notes.
Is there a way in Windows XP or a tool that anyone knows of where I
would be able to use keystrokes (i.e. CTRL+SHIFT+D) to automatically
insert the date and time into the active application at the cursors
location?

Thanks in advance for your help,

magmike

Type it once

Copy it

Paste it where you want in the future

Will work until you next copy/cut something or shut down the computer. If
you want it to remain indefinitely, get one of the clipboard apps that lets
you keep multiple clips. Here is one such...
http://www.cybermatrix.com/clipboard_magic.html

--

dadiOH
____________________________

dadiOH's dandies v3.06...
....a help file of info about MP3s, recording from
LP/cassette and tips & tricks on this and that.
Get it at http://mysite.verizon.net/xico
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top