This tool is very helpful, but the date options preconfigured were missing a valuable one that I use regularly; a full fledged mm/dd/yyyy formatted date (The shortdate built in now chops off the leading zero on months). I added this as %dm.
Added new date format of MM/dd/yyyy as %dm
Hey Richard, This is great stuff. Any idea how do do a combination that results in YYYY-MM-DD? That would be super helpful for creating filenames that have the date in them and then sorting by filename to get the latest version of the file.
Well, my addition was this:
FormatTime, XDate, , MM/dd/yyyy
StringReplace, ReplacementText, ReplacementText, `%dm, %XDate%, All
If you wanted to add YYYY-MM-DD, you'd simply need another block below it, I chose %dm randomly, so I'll go with %dw. And to play it safe, I'll create a new WDate variable to hold the formatted date.
FormatTime, WDate, , yyyy-MM-dd
StringReplace, ReplacementText, ReplacementText, `%dw, %WDate%, All
That should be enough right there, though I haven't tested it myself. If I get a chance and it works, I'll add it to the pull request.
Adding the request made by wbreetz for a YYYY-MM-DD format variable a…
…s well, called dw.
I tested it, it works. %dw is now good to go.
Very cool!! Thanks Richard!
How do I add your script to texter?
Added %dy option for year only dates.
@mikesolo I'm sorry for never responding to your question. You can either run the modified Texter.ahk instead of the executable, or you can build a new executable file using the bundled exe creator in AutoHotKey. The conversion program in it is called Convert .ahk to .exe. Simply plug in your Texter.ahk in the Source field, grab the Custom Icon from the resources folder. Then just convert, and it will put a new texter.exe in your main folder. An important note: if you have the 64bit version of AutoHotKey and create an exe from it, that exe will not work on a 32bit OS.
I am not positive, but I assume this is how @adampash compiled his originally.
@adampash, I'll throw this at you too, since ultimately you'll have to approve the pull requests.
@richard4339 thanks for your reply
I tried to give it a go and downloaded the source files and converted the ahk to an exe but if I run it I get the following error message
Error: A Goto cannot jump from inside a function to outside
Line# 1590, Goto, Homepage
If I click on texter.ahk I get a similar message
The file I downloaded was https://github.com/adampash/texter/archive/master.zip
Any ideas on what the problem is would be much appreciated