DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA : Universal counter for documents  (Read 7,996 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
IDEA : Universal counter for documents
« on: December 11, 2008, 08:19 PM »
I would like a script for introducing seguential code in documents editable of any type.

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 an autoIt script doing this ?

Thanks
Excuse my language. I'm from Canary Islands

aCkRiTe

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 21
Re: IDEA : Universal counter for documents
« Reply #1 on: December 11, 2008, 10:17 PM »
See if this works for you... {Win+x} fires the hotkey.  HTH

Code
#SingleInstance Force
#Persistent
#NoEnv
SendMode, Input
SetBatchLines -1
FormatTime, Year, ,yyyy
Cnt = 1

#x::
Click
Send, %Cnt%-%Year%
Cnt++
Return

This is in AHK btw...
« Last Edit: December 11, 2008, 10:19 PM by aCkRiTe »

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
Re: IDEA : Universal counter for documents
« Reply #2 on: December 12, 2008, 03:39 PM »
Return values in the way = number+yyyy

Example :

1-2008
21-2008 , etc

;D

compiled and running

Original address: https://www.donationcoder.com/forum/index.php?topic=16137.0