Jump to content

Recommended Posts

Posted

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?

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
×
×
  • Create New...