topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 4:37 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA : Universal counter for documents  (Read 5692 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
IDEA : Universal counter for documents
« on: December 11, 2008, 02: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
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: IDEA : Universal counter for documents
« Reply #1 on: December 11, 2008, 04:17 PM »
See if this works for you... {Win+x} fires the hotkey.  HTH

#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, 04:19 PM by aCkRiTe »

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: IDEA : Universal counter for documents
« Reply #2 on: December 12, 2008, 09:39 AM »
Return values in the way = number+yyyy

Example :

1-2008
21-2008 , etc

 ;D

compiled and running