Hotstring to Snippet?

16 views
Skip to first unread message

Dale Winchell

unread,
Nov 13, 2018, 4:36:21 PM11/13/18
to Quick Access Popup Support
I have a Hotstring to produce the date in yyyy/MM/dd format. It is

::,dates::        ;Insert Date YYYY/MM/DD [Slashes]
   FormatTime, xx,, yyyy/MM/dd ;
   SendInput, %xx%
Return

It works well as a Hotstring but trying to remember them all is hard. Can this be made into a Macro Snippet? I see at the end of https://www.quickaccesspopup.com/how-do-i-create-a-macro-snippet-and-execute-it-when-i-need-it/ that variables are not supported so I'm guessing the answer is no but I thought I would ask.

Thank you.

Jean Lalonde

unread,
Nov 13, 2018, 5:36:02 PM11/13/18
to Quick Access Popup Support
No, you can't insert variables and commands in QAP Snippets. But you could define an "Application" favorite for an AHK script (saved as .ahk file) containing only:

; Insert Date YYYY/MM/DD [Slashes]

FormatTime, xx,, yyyy/MM/dd ;
SendInput, %xx%

and give this favorite an hotstring of your choice. This does not add any functionality but it makes this available from QAP using hotstring, keyboard shortcut or the menu.

Dale Winchell

unread,
Nov 13, 2018, 7:22:13 PM11/13/18
to Quick Access Popup Support
Ok, thanks Jean. I got it working as I need as an Application. However it doesn't exit after it completes. The icon stays in the system tray and it is in Task Manager as well. How do I have it close?

Best Regards.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On Tuesday, November 13, 2018 at 4:36:21 PM UTC-5, Dale Winchell wrote:

Jean Lalonde

unread,
Nov 13, 2018, 7:40:01 PM11/13/18
to Quick Access Popup Support
Add the last line ExitApp:

; Insert Date YYYY/MM/DD [Slashes]

FormatTime, xx,, yyyy/MM/dd ;

SendInput, %xx%
ExitApp

Dale Winchell

unread,
Nov 13, 2018, 8:06:05 PM11/13/18
to Quick Access Popup Support
That does it. Thank you very much Jean.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages