Script

Is there some way to write a script so that I can use a hot key to insert the current date and time into a field?

Subject: Script

Not sure about a HotKey, but how about a SmartIcon?

The formula you need is @Command([EditInsertText];@Text(@Now))

You would goto the File-Preferences-Toolbar Preferences-Customize and select to create a New button. Select a unique icon, give it a name and some hover text and paste that formula into the formula area, save it.

Now position your cursor in a field where you want the date time/stamp, just click the icn on your toolbar.

You may need to make some small adjustments to your toolbar (expand its diplay) so that you can see your new icon.

Subject: RE: Script

Dude, You are the man. I have been working here for 7 months and been begging for a button like that. Granted a keystroke would be better as it would be faster but I can click that icon pretty fast too.

Is there a way to tie a VBScript into a keystroke where it can insert the date and time?

Subject: RE: Script

'Find the ASCII keycode for your key, Convert the decimal value to hexDeclare Sub keybd_event Lib “user32.dll” (Byval bVk As Integer, Byval bScan As Integer, Byval dwFlags As Integer,Byval dwExtraInfo As Integer)

Sub Click(Source As Button)

keybd_event &h11,0,0,0 ’ Control key down

keybd_event &h46,0,0,0 ’ Letter f key down

keybd_event &h46,0,2,0 ’ Letter f key up

keybd_event &h11,0,2,0 ’ Control key up

End Sub