How do I make that when I press Ctrl+D on my computer the User initials and time stamp show up in flowing format: <RL mm/dd/yyy hh:mm:ss>. The time and date should be the current time and date.
|
| |||||
feedback
|
|
This AutoIt code will put the timestamp in your clipboard for you to paste wherever you want. It uses the currently logged in username, it is impossible to get the initials of the person at the computer unless it is stored somewhere to pull from. If we new more about how you intended to use this, we could probably give a better solution.
| |||
|
feedback
|
|
The only way I can think to get the initials is if you have Microsoft Office installed, and if users have entered their full name in the Options, then their initials will be stored in the user preferences, and so available in the registry. If so, it should be possible to access this registry value in AutoHotKey, using the RegRead function. The registry key that stores the user initials is:
To show the reading of this registry value, the following code gets the registry value, and displays it:
The documentation I linked to above has more info about error-checking, to see if this key is actually available. You could always fall back on the username, as MaQleod suggested, if the initials aren't available this way. And for an alternative way of formatting the date... In AutoHotKey, and probably AutoIt too, you can use For example, the following are different short-cuts that I use, to insert the date in different formats, for different situation:
So, stringing all that together gives:
Having loaded that code in to AutoHotKey, when I hit Control + D, it is as though I typed:
| ||||
|
feedback
|