Welcome Guest.   Make a donation to an author on the site May 24, 2013, 10:40:23 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Check out and download the GOE 2007 Freeware Challenge productivity tools.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: AHK script to insert date and time to file name  (Read 3697 times)
wetsmellydog
Participant
*
Posts: 85

View Profile Give some DonationCredits to this forum member
« on: June 25, 2010, 11:30:46 AM »

While backing up some info today, I thought how cumbersome it is to type the date and time into the file name. It would be nice to have a shortcut that could do that.
Yes I know there is a time/date stamp on the file BUT this makes the file name unique too.

EX:

            "inserted text"
foobar 06_25_10 9-30am (does not have to follow this exact format just an idea)

Apologies up front if this has already been done but unfortunately I have not been able to find it.

Thanks!
Larry
Logged
lanux128
Global Moderator
*****
Posts: 5,880



plarker lanux128 see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: June 25, 2010, 11:53:32 AM »

is this what you're looking for? TimeStamp 2.1 by Skrommel..

• http://www.donationcoder....13669.msg116805#msg116805
Logged

wetsmellydog
Participant
*
Posts: 85

View Profile Give some DonationCredits to this forum member
« Reply #2 on: June 25, 2010, 12:19:34 PM »

is this what you're looking for? TimeStamp 2.1 by Skrommel..

• http://www.donationcoder....13669.msg116805#msg116805

Thanks for the link. Will have to take a look...one thing I notice is the formatting...certain characters are no no for file naming.
Logged


[ may-june 2013 ad experiment; click here to learn more about donationcoder.com ]

lanux128
Global Moderator
*****
Posts: 5,880



plarker lanux128 see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: June 25, 2010, 12:23:19 PM »

yes, that script was originally made to be pasted in the active window but in your case, the reserved characters should be excluded.

Quote
The following reserved characters are not allowed in file/folder naming: ! @ # $ % ^ & * ( ) + = ~ ` < > : " / \ | ? *

Logged

IainB
Supporting Member
**
Posts: 3,164


Slartibartfarst

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #4 on: June 25, 2010, 12:26:26 PM »

I use this - prune it how you like.
Having the date in ISO format at the front of the file name makes for good document filing/sorting.

AutoHotKey script:
Quote
^+d::  ; Ctrl+Shift+d outputs current date+time
   FormatTime, CurrentDateTime,, yyyy-MM-dd HHmm  ; It will look like 2010-12-21 0353hrs
   SendInput %CurrentDateTime%hrs
   return
Logged
wetsmellydog
Participant
*
Posts: 85

View Profile Give some DonationCredits to this forum member
« Reply #5 on: June 25, 2010, 01:12:07 PM »

I use this - prune it how you like.
Having the date in ISO format at the front of the file name makes for good document filing/sorting.

AutoHotKey script:
Quote
^+d::  ; Ctrl+Shift+d outputs current date+time
   FormatTime, CurrentDateTime,, yyyy-MM-dd HHmm  ; It will look like 2010-12-21 0353hrs
   SendInput %CurrentDateTime%hrs
   return

Sweet!  Thmbsup

Thanks! Hopefully I will have more time to work on learning AHK to be able to know that it takes a whole two lines of code to do this!

BTW works like a charm.
« Last Edit: June 25, 2010, 01:18:01 PM by wetsmellydog » Logged
IainB
Supporting Member
**
Posts: 3,164


Slartibartfarst

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #6 on: June 26, 2010, 11:21:38 PM »

@wetsmellydog: Thanks for your thanks. I cannot take credit for this as being "all my own work" though!

I actually lifted some AHK code from somewhere else (I forget where), and then later - after taking the time to discover/learn more about AHK - I simplified and modified the code to suit my particular requirements. So what you see is what I ended up with.

The sources I used were:

These are all good. The tutorials I came across were very helpful.

As an encouragement, I would suggest that you might pick it up quite quickly if you have no techo background to cloud your thinking with preconceptions.

You might think it would help to have a techo background, but sometimes I am not so sure.

For example, take my case: Having been introduced to computer programming via a low-level programming language used for assembler programming on mainframe computers years ago, I have always had difficulty changing my thinking to use any higher-level languages. It was thus difficult for me when I later had to adapt and learn to program in the programming language FORTRAN (which has to be compiled before execution), but when I learned the BASIC language it seemed quite foreign (it is not compiled, but runs through an interpreter at run-time). Years later, I had similar difficulty wrapping my mind around a scripting language (I think it was called "Telix") to control and manipulate data flowing between the PC serial port and a modem (driven by the Hayes AT command set).
So, when I came across AHK, though it at least had a degree of familiarity in its general structure, I had to push to one side everything that I had previously learned, lest it get in the way of my understanding this new thing.

You might not have that difficulty, from the sound of things.
Interestingly, from what I have read, a lot of the PC viruses over the years are apparently thought to have been developed by "script-kiddies" - virgins whose first PC programming language was a scripting language.
Logged
wetsmellydog
Participant
*
Posts: 85

View Profile Give some DonationCredits to this forum member
« Reply #7 on: June 28, 2010, 04:19:42 PM »

IainB "As an encouragement, I would suggest that you might pick it up quite quickly if you have no techo background to cloud your thinking with preconceptions."

No truer words were ever spoken!

I am an electronics engineer by trade and now a nurse. My specialty was automation and controls.

It has been tough to wrap my mind around how they want "nurses" to think. What seems simple to the people who do not have a technical background take on a whole new meaning to me.   huh

I am far ahead of what they are expecting and I have to remember to go from a to b to c instead of jumping right into c because I "know" it is right. I have also been working in the medical field for the last 4 years which also hinders that KISS thinking.

Some of us think in binary and some of us think in analog and some of us keep confusing the 10!!
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  



[ may-june 2013 ad experiment; click here to learn more about donationcoder.com ]


 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.045s | Server load: 0.05 ]