topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday March 29, 2024, 10:36 am
  • 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: Hotkeys/keyboard macros??  (Read 15491 times)

jpar5

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11
    • View Profile
    • Donate to Member
Hotkeys/keyboard macros??
« on: February 14, 2008, 08:17 AM »
I'd like to insert (paste) the current date and time as easily as possible, because I want to do it often.  Right now, the only way I see to do this is by hitting "Ctrl + Alt + Q" to bring up the quick paste menu, then hitting "R" for date and time text clips, and then hitting the number of the clip I want to paste.  Is there an easier way, like assigning this to a key or key combo that isn't currently used on my system?  Thanks.

J.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #1 on: February 14, 2008, 08:23 AM »
I think a dedicated program for that might be better...
I could whip up something in ahk really fast.
What's the date format you'd like to use and the key combo?

BigJim

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 178
  • I have seen the light!
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #2 on: February 14, 2008, 12:09 PM »
How about simply using the system date/time format?

BTW: Texter found over at the Lifehacker site can easily be used for this ... and LOTS more.
TruckerJim says "You can go down a hill too slow a thousand times. But too fast only once."

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #3 on: February 14, 2008, 01:15 PM »
that's funny
I was just thinking this morning of posting a similar request for CH&S

But of course AHK would be just as good
Just looking at Texter there
That's actually made using AHK

just seems to have these options for numerical dates
# %ds: Short date, which will return the date in the following format: 3/9/2007
which isn't much good for us europeans ;) [edit] actually it's unclear which is the month there...[/edit]

Do you have it installed BigJim?
Could you see if that's modifiable?
Tom
« Last Edit: February 14, 2008, 01:28 PM by tomos »

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #4 on: February 14, 2008, 01:26 PM »
Do you have it installed BigJim?
Could you see if that's modifiable?
had a quick look, not easily I think

I think a dedicated program for that might be better...
I could whip up something in ahk really fast.
What's the date format you'd like to use and the key combo?
that's tempting too :D
I'm running out of hotkeys though

how about
2008-02-14 16:00:56
is that
yyyy-MM-dd etc :-[ ?!
and a hotkey:-
Alt+D

is it easy to modify/personalise in ahk - the dates I mean especially?
Tom

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #5 on: February 14, 2008, 01:31 PM »
Allen made the perfect solution for this, in the ahk programming school section.

Maybe he could post it here? :)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #6 on: February 14, 2008, 01:36 PM »
Following your indications, Tomos..
Here's PasteDate.ahk:

; Author: jgpaiva
;
; Script Function:
; Send the current date to the active window
;

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

!D::
  FormatTime,CurrentTime,%A_Now%,yyyy-MM-dd HH:mm:ss
  tempClipboard := clipboard
  clipboard := CurrentTime
  Send,^v
  clipboard := tempClipboard
  return

It's really simple to change the format, just change the stuff after the last comma on this line:
FormatTime,CurrentTime,%A_Now%,yyyy-MM-dd HH:mm:ss

BigJim

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 178
  • I have seen the light!
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #7 on: February 14, 2008, 01:46 PM »
Either solution looks great. Yes, I have installed Texter and it seems that their description is a little confusing (having lived in Europe for over 20 years I 'share your pain' over date formats!). In Tester I simply defined a hotstring called "d s" (without the space) and it returns the system like so: 14 Feb 08  which is my system format. And another called "d t s" which returns the time, too:14 Feb 08 @ 15:46 hrs:  I also have a number of often used signature and such which are very handy. The only trick is to name them with 'non-naturally occurring' strings.
TruckerJim says "You can go down a hill too slow a thousand times. But too fast only once."

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #8 on: February 15, 2008, 02:40 AM »
thanks jg -
I thought you were going to wait for Allen there!
Testing:-
2008-02-15 09:15
Super, works a treat (I decided to remove the seconds.)

What's this about an Autohotkey school :-\
hmmm
Paste the Date

Make a function triggered by a hotkey that will paste the current date and time into the users currently open application (i.e. notepad).

Bonus:
1. When they trigger the function instead of pasting current date and time, ask them what format they want first, and give them some choices, like:
04/20/06, 22:00
or
April 20, 2006
or
April 20, 2006, 10:00pm
etc.
-https://www.donationcoder.com/forum/index.php?topic=3296.0
maybe when I've figured out SQL-Notes equations I'll finally try and figure out ahk and have a go at the rest of the assignment (or maybe something easier to start with)

@BigJim
if it does the system date that's good
I usually use the above format so if I using it in any columns where I can sort, it will sort logically/sequentially
you can tell I don't write a lot of letters :P
I might try it again, but strange thing here - it seems to disable my home and end keys - do you use it with Clipboard H&S? - maybe they clash? it seems to be okay without CH&S running
(I actually have direct access installed but shouldnt because this technically a "work" machine [at home though] and it's one of those free non-commercial-use liscences. So I'm slow to use it - also I write very little! [of to do some drawing work])
Tom

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #9 on: February 15, 2008, 03:21 AM »
Tomos: yep, i was about to wait because his is so much more complete. But then you specified a hotkey and a format, and that makes things sooo much easier ;)

I'm wondering if this solved jpar5's problem.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,199
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #10 on: February 15, 2008, 04:20 AM »
I use Horst Schaeffer's Calendar.  Just edit the INI to have whatever date and time formats you want.

Tekzel

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 228
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #11 on: April 23, 2008, 03:10 PM »
I think a dedicated program for that might be better...

Disagreed! :)

I actually was coming here to add a feature request, one that is kind of similar to this one.  Mouser, is there a possibility of assigning hotkeys to certain favorites in CHS?  There are a couple of items I am ALWAYS pasting in and while hitting Cont+Shift+Q, going to favorite clips, and selecting it is ok, it would REALLY be nice to be able to assign dedicated hotkeys to a CLIP, that way I can just press the hotkey and paste it in with no interface at all.

Edit: Doh, forgot something! Could it be possible to be able to expand date formatting codes in a clip along with this?  That way I could use say, ALT+D and paste the date, formatted the way I want, into any document, etc.
« Last Edit: April 23, 2008, 03:15 PM by Tekzel »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #12 on: April 23, 2008, 03:25 PM »
I will think about the ability to assign hotkeys to certain clips.
As for pasting dates, one of the features that got added to CHS in the last release was date/time formatting pasting menu items:
Screenshot - 4_23_2008 , 3_23_11 PM.png
In the options you can even specify a completely custom date/time format, and choose where the data/time formatting presets are displayed.

Does that solve your data/time request?

Tekzel

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 228
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #13 on: April 23, 2008, 03:41 PM »
Does that solve your data/time request?

Only if the hotkeys for clips feature is never added.  To me, the perfect situation would be where I can press a single hotkey and paste my favorite date/time formatted clip at the cursor location in any document.  This would, of course, require date/time formatting code expansion in favorite clips.  For giggles, I tried and and found it just pastes the codes verbatim, but I had to try it! :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #14 on: April 23, 2008, 03:43 PM »
I think i understand what you are asking..
Do you mean you have some clips with some of your own boilerplate extra text, and some embedded date info, and you want to be able to easily paste those?  Ok let me think about that.  It's definitely in the realm of what the traditional text-expander programs do, so we are starting to blur the lines here between a clipboard helper tool and a text expander, that's the only issue to be concerned with.

Tekzel

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 228
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #15 on: April 23, 2008, 03:51 PM »
I think i understand what you are asking..
Do you mean you have some clips with some of your own boilerplate extra text, and some embedded date info, and you want to be able to easily paste those?  Ok let me think about that.  It's definitely in the realm of what the traditional text-expander programs do, so we are starting to blur the lines here between a clipboard helper tool and a text expander, that's the only issue to be concerned with.

That is exactly what I want.  Theres nothing wrong, in my opinion, with a few blurry lines. :)  CHS already has the capability of using the date/time formatting codes, this is just a matter of letting it do it in a clip. 

TBear

  • Participant
  • Joined in 2008
  • *
  • Posts: 2
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #16 on: May 04, 2008, 08:10 PM »
I will think about the ability to assign hotkeys to certain clips.   . . .

As for pasting dates. . .In the options you can even specify a completely custom date/time format, and choose where the data/time formatting presets are displayed.  . . .

Hello Mouser, new user here.  Just dnloaded CPH+ and have begun playing with it.  As an old beta tester (Opera among others) I hope it's ok if I post questions/comments as I go along.

I for one would really appreciate ability to assign hot keys to individual clips.

Re your comment about "choos[ing] where the data/time formatting presets are displayed".  I'm not sure I follow.  Do you mean that one can arrange the location of the "Time/Date TextClips" on the left-click menu?  If so I'd like to move that down on the menu.  But I've been unable to find such an option.

FYI, I've been a SmartBoard user for years (I was still using the XP version when I finally decided to look around).

More to come.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #17 on: May 04, 2008, 08:12 PM »
Re your comment about "choos[ing] where the data/time formatting presets are displayed".  I'm not sure I follow.  Do you mean that one can arrange the location of the "Time/Date TextClips" on the left-click menu?  If so I'd like to move that down on the menu.  But I've been unable to find such an option.

sorry my comment was a bit misleading.  your only choices are whether to display it on quick pop up menu, and if so whether to display the items in a submenu or directly on the root quick popup menu.

TBear

  • Participant
  • Joined in 2008
  • *
  • Posts: 2
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #18 on: May 05, 2008, 04:36 PM »
Re your comment about "choos[ing] where the data/time formatting presets are displayed".  I'm not sure I follow.  Do you mean that one can arrange the location of the "Time/Date TextClips" on the left-click menu?  If so I'd like to move that down on the menu.  But I've been unable to find such an option.

sorry my comment was a bit misleading.  your only choices are whether to display it on quick pop up menu, and if so whether to display the items in a submenu or directly on the root quick popup menu.

Many thanks for your prompt reply.  That's another feature I'd love to see in a future version:  The ability to move MENU entries up or down.  (Yup, I'm a die-hard Opera fan who favors giving users as much ability as possible to modify features to their liking.)

Related to the above is the ability to manually move/arrange individual CLIPS within a category.  I.e., not just simple sorting by columns, but ability to move individual clips up or down within a category.

Any idea when we might get ability to assign hotkeys to clips?

Again, many thanks.

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: Hotkeys/keyboard macros??
« Reply #19 on: May 05, 2008, 05:53 PM »
Try this ahk script

:*:]d::  ; This hotstring replaces "]d" with the current date and time via the commands below.
FormatTime, CurrentDateTime,, d/M/yyyy ;h:mm tt 
SendInput %CurrentDateTime%
return

:*:}d::
FormatTime, CurrentDateTime,, yyyy_M_d
SendInput %CurrentDateTime%
return

:*:)d::
FormatTime, CurrentDateTime,, d_M_yyyy
SendInput %CurrentDateTime%
return