ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Document code : number-year

(1/1)

Contro:
Document code : number-year
I need an independant script for asigning codes to the document I make.
When I have the cursor over a text field, a word processor like word, notepad, wordpad, field notes on many programs, a database text field, etc , I might be able to invoke the script and write the code in that document. Just where the cursor is.
The code is formed by a sequantial number and the year : 000125-2008
Next time I invoke the script will be 000126-2008

Do you know a script doing this ?

Thanks
Excuse my language. I'm from Canary Islands

argv:
You can use this AutohotKey script (activate with windows key + i)


--- ---number=1
format=000000

#i::

len_number := StrLen(number)
len_format := StrLen(format)
len_padding := len_format - len_number
StringLeft, padding, format, len_padding
SendInput,%padding%%number%-%A_YYYY%
number ++
return

Hirudin:
I haven't used AutoHotkey for a while (well, I haven't used the program, I do use one of my old scripts several times a day though) so I can't give any personal pointers as far as making it work, but hopefully this site will get you at least as far as making argv's script work...

1. Download and install AutoHotkey
2a. Follow the instructions here: http://www.autohotkey.com/docs/Tutorial.htm#Create
2b. Replace step 5 of those instructions with the script above...

Contro:
I was looking for AutoHotkey to compile the Thanks
Excuse my language. I'm from Canary Islands and proof

Thanks

Contro:
Compile and running.

 ;D

Navigation

[0] Message Index

Go to full version