Hey folks,
I need to write a script of some kind that can do a rather simple thing.
1) Open cdkey.exe
2) Look into a txt file with a list of cd keys, enter the key that's been least recently used and move it to the bottom of the list
3) Open FTkey.exe
4) Look into a txt file with a list of cd keys, enter the key that's been least recently used and move it to the bottom of the list
5) run frozenthrone.exe
Is this possible in a standard XP environment? I know fuck all about this stuff...
Need help writing a script!
- Drolgin Steingrinder
- Way too much time!
- Posts: 3510
- Joined: July 3, 2002, 5:28 pm
- Gender: Male
- PSN ID: Drolgin
- Location: Århus, Denmark
Need help writing a script!
IT'S HARD TO PUT YOUR FINGER ON IT; SOMETHING IS WRONG
I'M LIKE THE UNCLE WHO HUGGED YOU A LITTLE TOO LONG
I'M LIKE THE UNCLE WHO HUGGED YOU A LITTLE TOO LONG
-
- Way too much time!
- Posts: 1673
- Joined: July 16, 2004, 11:02 am
- Location: Royal Palm Beach, FL
Re: Need help writing a script!
you should be able to do this with windows scripting host and the filesystemobject. both standard in XP
I TOLD YOU ID SHOOT! BUT YOU DIDNT BELIEVE ME! WHY DIDNT YOU BELIEVE ME?
-
- Way too much time!
- Posts: 1673
- Joined: July 16, 2004, 11:02 am
- Location: Royal Palm Beach, FL
Re: Need help writing a script!
im @ work and about to leave but if you need more help we can talk laters
I TOLD YOU ID SHOOT! BUT YOU DIDNT BELIEVE ME! WHY DIDNT YOU BELIEVE ME?
- Fash
- Way too much time!
- Posts: 4147
- Joined: July 10, 2002, 2:26 am
- Gender: Male
- XBL Gamertag: sylblaydis
- Location: A Secure Location
Re: Need help writing a script!
i could see this being done with a macro, but there may indeed be better ways to do it.
AutoHotkey is a pretty awesome free and opensource macro and automation software and can compile self-contained apps that loads your hotkey script... http://www.autohotkey.com/
(I used this on 19 processors computers in a billing department to strip 55 keystrokes from a simple process they were doing tens of thousands of times)
would follow this kind of path, I think.. (let me know if you want help putting this together this way)
] execute notepad.exe with path to text file
] short pause
] send shift+end (highlights line containing top cd key), ctrl+x (cut), shift+control+pagedown (end of document), ctrl+v (paste), ctrl+s (save), ctrl+w (close)
] execute cdkey.exe
] short pause
] send ctrl+v (paste), enter (would need to know more about entering the key in this program)
x2
maybe i put too much into this, but this kind of thing interests me, sorry, i'm a dork.
AutoHotkey is a pretty awesome free and opensource macro and automation software and can compile self-contained apps that loads your hotkey script... http://www.autohotkey.com/
(I used this on 19 processors computers in a billing department to strip 55 keystrokes from a simple process they were doing tens of thousands of times)
would follow this kind of path, I think.. (let me know if you want help putting this together this way)
] execute notepad.exe with path to text file
] short pause
] send shift+end (highlights line containing top cd key), ctrl+x (cut), shift+control+pagedown (end of document), ctrl+v (paste), ctrl+s (save), ctrl+w (close)
] execute cdkey.exe
] short pause
] send ctrl+v (paste), enter (would need to know more about entering the key in this program)
x2
maybe i put too much into this, but this kind of thing interests me, sorry, i'm a dork.

Fash
--
Naivety is dangerous.
--
Naivety is dangerous.
-
- Way too much time!
- Posts: 1673
- Joined: July 16, 2004, 11:02 am
- Location: Royal Palm Beach, FL
Re: Need help writing a script!
http://cadalano.com/key.zip
move both files into their own folder
run key.vbs, every time you run it it should open notepad and drop in the next text line in the list "stuff.txt". its a start. you can change notepad to be any application, assuming you'll be able to navigate to the correct field using only keystrokes.
youre missing a few parts though, are both applications using the same key? or do they both need to use independent lists?
can you navigate to the proper field on the key executables using keyboard commands?
do the exe's need to be closed?
and MOST IMPORTANTLY are you using this to try to get out of buying a 15 dollar CD key for frozen throne?
move both files into their own folder
run key.vbs, every time you run it it should open notepad and drop in the next text line in the list "stuff.txt". its a start. you can change notepad to be any application, assuming you'll be able to navigate to the correct field using only keystrokes.
youre missing a few parts though, are both applications using the same key? or do they both need to use independent lists?
can you navigate to the proper field on the key executables using keyboard commands?
do the exe's need to be closed?
and MOST IMPORTANTLY are you using this to try to get out of buying a 15 dollar CD key for frozen throne?
I TOLD YOU ID SHOOT! BUT YOU DIDNT BELIEVE ME! WHY DIDNT YOU BELIEVE ME?
- Drolgin Steingrinder
- Way too much time!
- Posts: 3510
- Joined: July 3, 2002, 5:28 pm
- Gender: Male
- PSN ID: Drolgin
- Location: Århus, Denmark
Re: Need help writing a script!
It's not to get out of buying keys - at work we have 30 some machines and used to have 25ish keys. Now a lot of these keys have been stolen and we're down to 10. This means that pretty much every other time someone needs to log on to bnet, we have to manually change the keys which is a hell of a hassle, especially since we may need to change it 5-6 times to find one that's free.
The keys are in this format:
XXXXX XXXXX XXXXX XXXXX XXXXX and it is possible to tab between the fields. The two cdkeychangers need to be closed down as well, but I believe you can tab to the 'Finished' button as well. CDkey.exe and FTkey.exe use different key lists.
The keys are in this format:
XXXXX XXXXX XXXXX XXXXX XXXXX and it is possible to tab between the fields. The two cdkeychangers need to be closed down as well, but I believe you can tab to the 'Finished' button as well. CDkey.exe and FTkey.exe use different key lists.
IT'S HARD TO PUT YOUR FINGER ON IT; SOMETHING IS WRONG
I'M LIKE THE UNCLE WHO HUGGED YOU A LITTLE TOO LONG
I'M LIKE THE UNCLE WHO HUGGED YOU A LITTLE TOO LONG
- Drolgin Steingrinder
- Way too much time!
- Posts: 3510
- Joined: July 3, 2002, 5:28 pm
- Gender: Male
- PSN ID: Drolgin
- Location: Århus, Denmark
Re: Need help writing a script!
Ok, a bit of an update.
The keys are stored in two .txt files.
\\cs-server2\Menu\keys\WC3 Keychanger project\cdkey.txt and
\\cs-server2\Menu\keys\WC3 Keychanger project\ftkey.txt, both stored like this:
XXXXXX-XXXX-XXXXXX-XXXX-XXXXXX
XXXXXX-XXXX-XXXXXX-XXXX-XXXXXX
XXXXXX-XXXX-XXXXXX-XXXX-XXXXXX
XXXXXX-XXXX-XXXXXX-XXXX-XXXXXX etc.
The executables are in
C:\spil\Warcraft III\cdkey.exe
C:\spil\Warcraft III \ftkey.exe
C:\spil\Warcraft III\Frozen Throne.exe
The first file, cdkey.exe needs to open, input 'K' for Change Key, input XPC, then input XXXXXX tab XXXX tab XXXXXX tab XXXX tab XXXXXX tab Enter, wait a second or so for it to write the data to the registry, then input X for eXit.
Second file, ftkey.exe is similar except for the 'input XPC' part.
The keys are stored in two .txt files.
\\cs-server2\Menu\keys\WC3 Keychanger project\cdkey.txt and
\\cs-server2\Menu\keys\WC3 Keychanger project\ftkey.txt, both stored like this:
XXXXXX-XXXX-XXXXXX-XXXX-XXXXXX
XXXXXX-XXXX-XXXXXX-XXXX-XXXXXX
XXXXXX-XXXX-XXXXXX-XXXX-XXXXXX
XXXXXX-XXXX-XXXXXX-XXXX-XXXXXX etc.
The executables are in
C:\spil\Warcraft III\cdkey.exe
C:\spil\Warcraft III \ftkey.exe
C:\spil\Warcraft III\Frozen Throne.exe
The first file, cdkey.exe needs to open, input 'K' for Change Key, input XPC, then input XXXXXX tab XXXX tab XXXXXX tab XXXX tab XXXXXX tab Enter, wait a second or so for it to write the data to the registry, then input X for eXit.
Second file, ftkey.exe is similar except for the 'input XPC' part.
IT'S HARD TO PUT YOUR FINGER ON IT; SOMETHING IS WRONG
I'M LIKE THE UNCLE WHO HUGGED YOU A LITTLE TOO LONG
I'M LIKE THE UNCLE WHO HUGGED YOU A LITTLE TOO LONG
-
- Way too much time!
- Posts: 1673
- Joined: July 16, 2004, 11:02 am
- Location: Royal Palm Beach, FL
Re: Need help writing a script!
you can do a split on the lines using hyphen as delimiter to separate out each part of the keys
i can probably change the script to do that later today if you're lost, still @ work so it'll be awhile!
i can probably change the script to do that later today if you're lost, still @ work so it'll be awhile!
I TOLD YOU ID SHOOT! BUT YOU DIDNT BELIEVE ME! WHY DIDNT YOU BELIEVE ME?