Date Stamp with GUI Script

Share your favorite FastKeys commands
Posts: 3
Joined: Sat Sep 06, 2014 4:55 am

Date Stamp with GUI Script

PostPosted by big-red » Sat Sep 06, 2014 5:10 am

Hi folks,

I tried the trial version of FastKeys a few weeks ago. Didn't take me long to purchase this great programme. Just what I'm looking for.

A question.

I use date stamps on my documents using the excellent AutoHotkey script and the bottom of this post.

Sometimes I use variations on the date format yyyyMMdd or ddMMyyyy.

I can run the script in FastKeys as a command (removing the !^d:: keystroke command, as this is already covered in FastKeys).

When I make a few duplicate shortcuts with my date variants, I allocate them different shortcut keys, and different names, but they always produce the same date format result.

I've found that whichever script is uppermost in the 'shortcuts' menu, that script is used. I've proved this by swapping the order of the shortcuts.

Anybody have an idea why this might be happening? It's been my only FastKeys fustration so far.

!^d::
Gui, Add, MonthCal, vDayPick
Gui, Add, Button, Default, Submit
Gui, Show
return

ButtonSubmit:
Gui, Submit
FormatTime, DayPick, %DayPick%, MMMM d, yyyy
Send, %DayPick%
Gui, Destroy
return

Site Admin
User avatar
Posts: 642
Joined: Sat Mar 02, 2013 9:02 pm

Re: Date Stamp with GUI Script

PostPosted by Marko » Sun Sep 07, 2014 12:13 am

Hi and welcome to the forum. I think the issue might be that you use the same label name in your duplicated shortcuts. Try renaming the labels in duplicates to ButtonSubmit1, ButtonSubmit2 etc.

Let me know if this helps.

Posts: 3
Joined: Sat Sep 06, 2014 4:55 am

Re: Date Stamp with GUI Script

PostPosted by big-red » Sun Sep 07, 2014 2:45 am

Hi Marko

Thanks for your reply - If you mean the second field from the top when editing the shortcut named 'description', then they definitely have different names.

Is this what you meant?

Site Admin
User avatar
Posts: 642
Joined: Sat Mar 02, 2013 9:02 pm

Re: Date Stamp with GUI Script

PostPosted by Marko » Sun Sep 07, 2014 9:44 am

What I meant is to change the first duplicate command field (script) to:

Gui, Add, MonthCal, vDayPick
Gui, Add, Button, Default, Submit1
Gui, Show
return

ButtonSubmit1:
Gui, Submit
FormatTime, DayPick, %DayPick%, MMMM d, yyyy
Send, %DayPick%
Gui, Destroy
return

(Changes in bold). In the next duplicate, change it to Submit2 and ButtonSubmit2 and so on...

Posts: 3
Joined: Sat Sep 06, 2014 4:55 am

Re: Date Stamp with GUI Script

PostPosted by big-red » Sun Sep 07, 2014 11:14 am

Now works perfectly.

I see I'm going to have to learn some ahk scripting.

Thanks Marko for your help / prompt replies.

Posts: 1
Joined: Mon Aug 08, 2016 7:11 pm

Re: Date Stamp with GUI Script

PostPosted by ryangallagher » Mon Aug 08, 2016 7:17 pm

Would it be possible to use a custom date-time script or a script that can create a folder with the format "YYMMDD-HHMM" of the moment I am creating the folder is that possible. Or a string that would replace on complete.

Site Admin
User avatar
Posts: 642
Joined: Sat Mar 02, 2013 9:02 pm

Re: Date Stamp with GUI Script

PostPosted by Marko » Tue Aug 09, 2016 10:31 pm

yes, easy. Create a shortcut (or any other module), Type: Command
Code: Select all
FormatTime, MyDate, , yyMMdd-HHmm
FileCreateDir, % MyDate
Msgbox, Folder %MyDate% created.

https://autohotkey.com/docs/commands/FormatTime.htm

Return to User Commands and Scripts

Who is online

Users browsing this forum: No registered users and 0 guests