Jump to content

Can this be done in AutoIt?


romulous
 Share

Recommended Posts

Hi everyone,

I'm a novice AutoIt scripter and I had an idea for a script that would help me out (if it could be done in AutoIt). What I was after was an AutoIt expert to tell me if this was even possible to do in AutoIt before I attempt it. Basically, the idea is for a CD Key paster. Whenever I install a program on my PC that has a CD Key, the installation process usually has a 20-25 digit field for the CD Key, broken up into 6 fields of 4 characters or 5 fields of 5 characters. What I have to do when I encounter one of these is to open my software database, highlight the first 4 or 5 characters of the CD Key, copy, then swap back to the installer, and then paste them into the first field. Alt+Tab back to the database, copy the second lot of 4-5 characters, go back to installer, paste etc. What I would like to code is this:

-I install a program that requires a CD Key

-I then open up the AutoIt script which (from a text file) reads the appropriate CD key for the program being installed, and then - when I press a hot key - automatically pastes that entire CD Key into the installation process, 4 or 5 characters to a box

These are the notes I put into a blank .au3 file.

"Script needs to perform the following steps:

1. Be able to accept input of Program Name, CD (or Product) Key or Serial Number, number of boxes on the CD Key screen in the program installation and save this to a text file (or be able to read it from a manually generated text file).

2. To be able to then be activated by a hot key, which you would press when the program installation reaches the 'enter CD Key' screen.

3. To then be able to detect the CD Key field (this may be the hardest bit of the lot, depends on whether each CD Key field is a standard Windows control or not).

4. To then be able to detect what program is being installed, before reading that CD Key information from the text file.

5. Lastly, to be able to then paste that information into the CD Key field. As some installers use 4 characters to a box, and others 5 or even 6, the script would need to count how many characters in the CD Key, and then divide that by the number of boxes on the CD Key screen, to work out how many characters it has to paste in each part of the CD Key field before tabbing to the next part of the field (or if the installer takes you to the next part of the field when you fill the first 4-5 characters, then don't Tab to the next part)."

So, can anyone tell me if this can be done in AutoIt? I don't necessarily feel the need to code my own program, but I figured that the chances of me finding one out there on the 'net that does this already are very very slim.

Regards,

CM

Link to comment
Share on other sites

Hi everyone,

I'm a novice AutoIt scripter and I had an idea for a script that would help me out (if it could be done in AutoIt). What I was after was an AutoIt expert to tell me if this was even possible to do in AutoIt before I attempt it. Basically, the idea is for a CD Key paster. Whenever I install a program on my PC that has a CD Key, the installation process usually has a 20-25 digit field for the CD Key, broken up into 6 fields of 4 characters or 5 fields of 5 characters. What I have to do when I encounter one of these is to open my software database, highlight the first 4 or 5 characters of the CD Key, copy, then swap back to the installer, and then paste them into the first field. Alt+Tab back to the database, copy the second lot of 4-5 characters, go back to installer, paste etc. What I would like to code is this:

-I install a program that requires a CD Key

-I then open up the AutoIt script which (from a text file) reads the appropriate CD key for the program being installed, and then - when I press a hot key - automatically pastes that entire CD Key into the installation process, 4 or 5 characters to a box

These are the notes I put into a blank .au3 file.

"Script needs to perform the following steps:

1. Be able to accept input of Program Name, CD (or Product) Key or Serial Number, number of boxes on the CD Key screen in the program installation and save this to a text file (or be able to read it from a manually generated text file).

2. To be able to then be activated by a hot key, which you would press when the program installation reaches the 'enter CD Key' screen.

3. To then be able to detect the CD Key field (this may be the hardest bit of the lot, depends on whether each CD Key field is a standard Windows control or not).

4. To then be able to detect what program is being installed, before reading that CD Key information from the text file.

5. Lastly, to be able to then paste that information into the CD Key field. As some installers use 4 characters to a box, and others 5 or even 6, the script would need to count how many characters in the CD Key, and then divide that by the number of boxes on the CD Key screen, to work out how many characters it has to paste in each part of the CD Key field before tabbing to the next part of the field (or if the installer takes you to the next part of the field when you fill the first 4-5 characters, then don't Tab to the next part)."

So, can anyone tell me if this can be done in AutoIt? I don't necessarily feel the need to code my own program, but I figured that the chances of me finding one out there on the 'net that does this already are very very slim.

Regards,

CM

100% can be done with AutoIt, but I rememebered somebody has done it before, search in example forum may save you loads of time.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...