Htmlform

From Kolmafia
Revision as of 19:45, 29 November 2010 by imported>StDoodle
Jump to navigation Jump to search

Attention KoLmafia Users!

This page details the use of functions in a script library. The information here is only useful to those who have followed the included steps to make use of these functions; they are not built-in to KoLmafia.

About jasonharper's Form Library

It does stuff with forms. Like Magic. Also, it turns your body into html so that all your attacks will do html damage. This is obviously placeholder text, duh.

Functions

Generating the Page Structure

write_header

void write_header()

void finish_header()

void write_page()

write_page() is equivalent to write_header() followed by finish_header(), but the separate functions may be preferred so that you can add information into the page header such as a script or stylesheet.


finish_page

void finish_page()

This must be used at the end of the form.


write_box

void write_box(string label )

void finish_box()

These can be used in matched pairs around a group of elements to enclose them in a box. The label will be at the top of the box.
attr("align=center") or attr("align=right") will change the position of the label.

Making use of HTMLform

To include this library in your script, simply add the following towards the top of your script:

import "htmlform.ash";

Then all these functions will be available in your script. Have fun!

More Information

See the thread for HTMLform on the KoLmafia forum here.