topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday March 18, 2024, 10:00 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: key combination should paste current date, time and USERNAME (Request...  (Read 11126 times)

ERChambers

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 5
    • View Profile
    • Donate to Member
Does anyone have an AutoHotkey script which upon hitting a shortcut key combination will enter in a text string of the current date, time and USERNAME into any program like e-mail or anything else?
« Last Edit: February 16, 2006, 05:51 AM by brotherS »

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,260
    • View Profile
    • Donate to Member
Re: Request for a simple AutoHotkey script
« Reply #1 on: February 15, 2006, 02:04 PM »
Hi!

Maybe we could help you better when you tell us more about that task?

For example, adding

:o*:.udc::https://www.donationcoder.com/forum/index.php

to your AHK script (just right-click AutoHotkey's tray icon and edit it - read http://www.autohotkey.com/ yet?) will allow you to type .udc anywhere and - voila - you'll get the DonationCoder URL :)

ERChambers

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 5
    • View Profile
    • Donate to Member
Re: Request for a simple AutoHotkey script
« Reply #2 on: February 15, 2006, 02:16 PM »
Sure, thanks so much for the prompt moderation...  What I have is that we are getting ready to switch our software user support department off of our old unix based call tracking software to Microsoft CRM (oh-boy).  Our old system had a shortcut key defined where one could hit <shift> ~  at any time and get the text string for the current date, time, and user initials entered in to the resolution text of the support call to help document the progress of the assisting of the customer.  Now that we are going away from that old system and over to the new web-based customer relation ship management system I wanted to give my users a similar Windows shortcut key that would allow them to just hit <ctrl> ~ and get the current date time and USERNAME entered in at the current cursor position whether that is in the Microsoft CRM in a text field or in MS Outlook or whatever.  I started looking at different apps and have found four that we are looking in to.  "Super Keys", "AutoHotKey", "Free QuickLauncher", "MemoKeys".  I would loved to get recommendations on what is the easiest and most cost effective and smallest memory "footprint" manner to solve this simple request.  I started to look into AutoHotKey but not being a programmer god, it was probably going to take me quite a while to get familiar with it and make it happen.  Any suggestions?  Thanks a tin for any assistance or recommendations you can offer.  ERC...

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Request for a simple AutoHotkey script
« Reply #3 on: February 15, 2006, 02:29 PM »
This post should be moved to Coding Snacks section ;)

You're looking for something like this:
#persistent

^~::
Send,%A_NowUTC% - %A_UserName%
return

A script only containing this, might be not what you're looking for, because it uses 1.2mb of ram.
The thing is, if you add more functionalities to it, it'll use almost the same resources as this one.
So, it's up to you to decide if it fits what you're looking for.

ERChambers

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 5
    • View Profile
    • Donate to Member
Re: Request for a simple AutoHotkey script
« Reply #4 on: February 15, 2006, 03:02 PM »
Very cool.  Thanks, jgpaiva for that suggestion.  It does work but now as is usually the case when you give someone an inch they then want a mile...  Could you show me how to slip in the Date Formatting feature so the Date/Time output doesn't look so raw?

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Request for a simple AutoHotkey script
« Reply #5 on: February 15, 2006, 05:21 PM »
Actually, i imagined you'd want that.
Check this page: http://www.autohotke...m/docs/Variables.htm
Scroll to "Date and Time". Those are the variables that contain the date and the time. I used A_NowUTC. Just follow my example, and replace for the formating you want.
To have a phrase like the following: 2006/02/15 - JGPaiva, the command line would be:
%A_YYYY%/%A_MM%/%A_DD% - %A_UserName%
The '%' characters indicate to use the value of the variable, and the rest of the characters are displayed as literals.
I'm not a "programing god", as many may confirm, I've started using ahk for about one month, and learned almost everything about it in 2 weeks. Try reading the first tuturials. You'll see it's a very easy and straight-forward scripting language, and in no time you'll be able to do almost everything you want to do.
Skrommel's great one-hour software page, might also be a good starting point. It worked for me ;)

ERChambers

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 5
    • View Profile
    • Donate to Member
Re: Request for a simple AutoHotkey script
« Reply #6 on: February 15, 2006, 05:39 PM »
Whoa!  thanks again.   This will really help.  I should be able to run with this.  I really really appreciate your help.  Good Karma be upon you.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Request for a simple AutoHotkey script
« Reply #7 on: February 15, 2006, 05:41 PM »
Good Karma be upon you.
I hope so! ;)

ERChambers

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 5
    • View Profile
    • Donate to Member
Re: Request for a simple AutoHotkey script
« Reply #8 on: February 15, 2006, 07:03 PM »
2006/02/15 17:02 EChambers;-  No need to "hope" my friend; simply accept that it is a force of nature.  You have done good to me today = Good will be visited back upon you.  This is the way it is.   over and out. ERC