Sign in to follow this  
Followers 0
ppat

Manipulating config file with Autoit

4 posts in this topic

I would like to make an autoit script, that, based on the computer name, edits a config file of a program.

This involves finding a line in text, copying and pasting a line, manipulating some characters in the pasted line of the config file.

Is this possible in AUtoit, if so could some one point me to the relevant tutorial or page in the manual?

Cheers

Share this post


Link to post
Share on other sites



I would like to make an autoit script, that, based on the computer name, edits a config file of a program.

This involves finding a line in text, copying and pasting a line, manipulating some characters in the pasted line of the config file.

Is this possible in AUtoit, if so could some one point me to the relevant tutorial or page in the manual?

Cheers

Yes, this is possible in AutoIt. In the help file, read up on FileOpen(), FileReadLine(), FileWriteLine(), ... basically everything that starts with File. :)

You may need to look at string manipulation as well; take a look at the functions starting with String in the help file.


Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

Share this post


Link to post
Share on other sites

Thanks for this explanation.

In fact, it turned out to be much simpler than I thought with the IniWrite() function, because I just have to change a value in a section of an .ini file.

Share this post


Link to post
Share on other sites

Yes, I've come to love working with .ini files. It's all so easy! =D

Share this post


Link to post
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
Sign in to follow this  
Followers 0