topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday April 19, 2024, 5:23 pm
  • 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: Simple Text Verifier (Autohotkey script)  (Read 11835 times)

wr975

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 369
    • View Profile
    • Donate to Member
Simple Text Verifier (Autohotkey script)
« on: September 09, 2011, 02:52 AM »
I thought I share a little AHK script I made a while ago and use quite often. Perhaps someone finds it useful.

Usage:
Type something in twice, and it informs you if both entries are the same. If yes, the entry is copied to the clipboard.

That's it.

Compiled script and source attached to this forum entry. Enjoy.

1.jpg

2.jpg


Why I made it (if you're interested)
At my workplace I've to install updates for a telephone software. They send a DVD and a letter with a really long serial number. The serial has to be entered once and there's no "serial is wrong" check. If the serial is wrong, the app continues to work for some time, but eventually starts telling "no data found" for every query. Yes, as silly as it sounds, but that's their idea of copy protection. To help myself, I typed in the serial twice in notepad and compared if I got it right.

As I had some time to kill I played with AHK and created this script. The idea is, that I wouldn't enter the same error twice. I use it to type in serial keys, TAN numbers, bank account numbers... just anything important, where's no margin for error.

The script is pretty basic. The #If Routine is the only AHK_L in there. The most advanced part of the script is the coloring of the fields. This routine isn't done by me. Proper credit is given in the source of course, but it demonstrates real nice that AHK was never intended as programming language and has to be forced to do such things.

Usage example
Let's say, you got a list with 50 TAN codes for your bank account and want them imported in your password app like KeePass.
Enter the TAN codes in Simple Text Verifier, activate "Write Log". If typed in correct, it'll be saved in the log file. Press CTRL+L to open the log.
You've to enter every TAN twice, but at least you know it's 100%.

Edit: Script updated to v3
Since I keep using this little script and missed some features, I updated it:

  • I always liked the auto-hyphen if I type in Microsoft serials. Now the script can do the same.
  • If there's a difference, it'll tell you where it is.
  • Positive results can be written in a log file (easy collection of TAN numbers)
  • Write chars upper-case and stay-on-top.
« Last Edit: May 15, 2012, 03:37 AM by wr975 »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: Simple Text Verifier (Autohotkey script)
« Reply #1 on: September 09, 2011, 03:13 AM »
I can see a few use-cases for this, great :Thmbsup:

capitalH

  • Participant
  • Joined in 2008
  • *
  • Posts: 71
    • View Profile
    • Donate to Member
Re: Simple Text Verifier (Autohotkey script)
« Reply #2 on: September 09, 2011, 04:31 AM »
I suppose I should not use the same technique as I use on password fields in websites (or email fields) where I copy it to the second field...

wr975

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 369
    • View Profile
    • Donate to Member
Re: Simple Text Verifier (Autohotkey script)
« Reply #3 on: September 09, 2011, 05:52 AM »
I suppose I should not use the same technique as I use on password fields in websites (or email fields) where I copy it to the second field...

The script is of course useless if someone would copy and paste... Never thought of that.   ;)

Edit: Script updated, see first thread. Won't allow clipboard pasting anymore.
« Last Edit: May 15, 2012, 02:19 AM by wr975 »

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: Simple Text Verifier (Autohotkey script)
« Reply #4 on: September 09, 2011, 06:11 AM »
Thanks for sharing, wr975  :Thmbsup: