Jump to content
Sign in to follow this  
Spartanicus

IS AutoIt capable of this?

Recommended Posts

Spartanicus

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?

Share this post


Link to post
Share on other sites
PsaltyDS

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

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  

×