Jump to content

IS AutoIt capable of this?


Recommended Posts

Before diving into the syntax (first time user) I'd like to know if AutoIt is capable of doing something. I need 2 things primarily, extract the domain name from an URL, and read and write to an ini file with [foo] type headers. I've written out what I want to do in prose:

Required actions for a "Edit site user CSS" function

-------------------------------------------------

Site: http://example.com/file.htm

Call the script with "http://example.com/file.htm" as the command line parameter.

Extract the domain name ("example.com").

Parse the [Overrides] section in c:\apps\opera 9.10\profile\override.ini for an "example.com" entry.

If found, find the [example.com] section, parse it for an "User Prefs|Local CSS File" entry, if present change the value to "C:\apps\opera 9.10\styles\example.com.css", if not found append "User Prefs|Local CSS File=C:\apps\opera 9.10\styles\example.com.css" to the end of the [example.com] section.

If not found append a "example.com" line to the [Overrides] section and append this section to the end of the override.ini file:

[example.com]

User Prefs|Local CSS File=C:\apps\opera 9.10\styles\example.com.css

Open "C:\apps\opera 9.10\styles\example.com.css" in UltraEdit.

Is AutoIt capable of doing this?

Link to comment
Share on other sites

AutoIt has plenty of String manipulation functions and dedicated INI file functions.

Easily done.

And, welcome to AutoIt!

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...