Jump to content
Sign in to follow this  
Guest chi

Include line from .txt or .ini into script

Recommended Posts

Guest chi

Q. How do I pull a line from a .txt or .ini file into an autoit script and have it key in the result?

I think I need to use the iniread or iniwrite commands; however, I can't get it to run properly. I am trying to automatically pull a seriel number from a file and insert it into the proper place in the script.

Here is the script part:

sleep, 2000

IniRead,OutPutVar,G:\\swdist\\software Module\\keycode.ini,section,key

sleep, 3000

the keycode.ini reads as follows:

[sECTION]

KEY=RDE50-QV9LR-RAR6W-HEGLR-12345

Edited by chi

Share this post


Link to post
Share on other sites
Beastmaster

a) script reads the serial # from the INI/txt file
b) script reads a script template and replace a dummy/place holder with that string/value*
c) script template has to be "saved as" a new script (to keep the script template untouched)
d) script executes new script

*I'm not allowed to recommend anything different then AU3, to accomplish this task (strongly advised by Jon). Sorry pal.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×