Jump to content

Manipulating config file with Autoit


Recommended Posts

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

Link to comment
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
Link to comment
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.

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...