home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
htmlkeys.zip
/
HtmlKeys.424
< prev
next >
Wrap
Text File
|
1997-09-02
|
10KB
|
216 lines
<HTML >
<HEAD>
<TITLE>Marks HTML Macros for EPM</TITLE>
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<H1 ALIGN="CENTER">Marks Macros for EPM</H1>
Here another set of HTML macros for EPM. Like those before Me, I've
stolen ideas from those who have gone before me. Making them a little
better (I hope). Thanks to those who have done the work upon which I
built. Special thanks to the <A HREF="http://www.htmlhelp.com/">Web Design Group</A>
for creating the INF documentation Included.
<H2>Features</H2>
<OL TYPE=1>
<LI>Keystrokes to enter tags.
<LI>Drag & Drop for URL objects, HTML files, images and Java classes.
<LI>Help menu additions for HTML documentation.(If you have any)
<LI>Defaults for tag arguments saved with each individual file.
<LI>Navigational assistance.
<LI>An optional Toolbar
</OL>
This is 3.2 compliant, no Frames, no Blink or any other jackass tags.
<H2 ALIGN="LEFT">Installation</H2>
<H3 ALIGN="LEFT">Cautionary notes</H3>
This file can be compiled as part of a larger package or as a linkable
module. Because of the Kludgy way I handled URL's
with the data type <CITE>UniformResourceLocator</CITE>, it isn't recommended that
it be compiled as part of your basic EPM package without setting <CODE>HTML_URL_KLUDGE</CODE>
to 0. In rare circumstances this can cause problems. Because these macros use the field
variable <CODE>.userstring</CODE> they shouldn't be compiled in any package where it might
also be used.
<H3 ALIGN="LEFT">Installation (really)</H3>
<H4 ALIGN="LEFT">Where the files should go</H4>
It depends. I wrote these under version 603b, and haven"t tried them
under earlier versions, and the paths are from the EPM6 version.
If you don"t have it you might as well
<A HREF="ftp://ftp.pc.ibm.com/pub/pccbbs/os2_util/epm603b.zip">get it</A>,
it's free.
<BR CLEAR=ALL>
The files <SAMP>htmlkeys.e</SAMP> and <SAMP>htmlconst.e</SAMP> should go in in the directory
<CODE>X\:EPM6\MAC</CODE>, or whatever directory you have all your <SAMP>*.e</SAMP> files.
The <SAMP>*.erx</SAMP> files should go in <CODE>X:\EPM6</CODE> or wherever you have all your
<SAMP>*.erx</SAMP> files. The file <SAMP>wilbur.inf</SAMP> should go somewhere in the path
described by your <CODE>BOOKSHELF</CODE> environmental variable (or you could change the
variable). The Rexx <SAMP>*.cmd</SAMP> files should go somewhere in your <CODE>PATH</CODE>
<H4 ALIGN="LEFT">Paths</H4>
If you haven't set your <CODE>EPMPATH</CODE> in your <SAMP>CONFIG.SYS</SAMP>, do it.
<H4 ALIGN="LEFT">Compiling it</H4>
Edit the file <SAMP>WEBOPTIONS.E</SAMP> to suit your installation.<BR CLEAR=ALL>
<BR CLEAR=ALL>
The Variables are:
<DL>
<DT><CODE>JAVA_HTML_BROWSER</CODE>
<DD>Fully qualified path to your browser (or just the name
if it is in your PATH) and switches.
<DT><CODE>HTML_IF_ARG_BLANK</CODE>
<DD>Set this to "exit" if you want to abort a tag when mandatory arguments are
not entered, otherwise you will be re-prompted
<DT><CODE>HTML_URL_KLUDGE</CODE>
<DD>Set to 0 to turn off the URL kludge.
</DL>
<H5 ALIGN="LEFT">Linkable</H5>
Just type <KBD>etpm htmlkeys</KBD> and when you are ready to use it, from the command
window type <KBD>link htmlkeys</KBD>
<H5 ALIGN="LEFT">As Part of a Larger Package</H5>
Enter the line <CODE>include 'htmlkeys.e'</CODE> in your <SAMP>MYSTUFF.E</SAMP> file
and at the command line in the EPM directory type <KBD>etpm <I>package</I></KBD>, and you're ready to go.
<H2 ALIGN="LEFT">Use</H2>
<H3 ALIGN="LEFT">Keyboard Entry</H3>
Most of the <KBD>CTRL, ALT and F*</KBD> keys have been overridden to be shortcuts
for tag entry. You can find out which does which by looking at the menu. Some tags will
check to see if there is any text marked on on the screen. If there is, it will be surrounded
by the tag. Otherwise they will be placed adjacent to one another with the cursor between them.
Tags that normally occupy more than one line are inserted with opening tag where the cursor is.
a blank line below it and the closing tag following the blank line and the cursor placed between
the tags at <CODE>.col=1</CODE>.<BR>
<BR>
If a tag has arguments you will be prompted for the values. If you enter a blank for a
mandatory tag you will be prompted for the correct value or the tag will be aborted depending
upon your configuration. You can also abort a tag by entering or choosing <KBD>#OOPS</KBD>
when prompted.<BR>
<BR>
The case of tags can be toggled with the <CITE>Toggle Case</CITE> menu item.
<H3 ALIGN="LEFT">Drag & Drop</H3>
All path separators are converted to UNIX style<BR>
<BR>
If the leading path of the file being edited is the same as that of a dropped object the
portion that is identical will be removed for the tag, creating a relative url.<BR>
<BR>
For Example:<BR>
<BR>
If you are editing a file <SAMP>e:\foo\myfile.html</SAMP> and drop the file <SAMP>e:\foo\bar\a.gif</SAMP>,
the path for the gif that will be entered is <SAMP>/bar/a.gif</SAMP>.
<H4 ALIGN="LEFT">HTML files</H4>
The Macros will scan the first 10 lines for a <CODE><TITLE></TITLE></CODE> pair
and uses that for the text of the link.
<H4 ALIGN="LEFT">URL's</H4>
Dropping a URL will create a link, using the name of the object for the text of the link.
<BLOCKQUOTE>For some reason EPM doesn't recognize data types of more that 18 characters, which
is problematic for the data type <CODE>UniformResourceLocator.</CODE>
I created a kludge to get around this. It decides a file is a URL if it is only one line
long and the text looks like a URL. This kludge can be turned off by setting <CODE>HTML_URL_KLUDGE</CODE>
to 0 in your <SAMP>WEBOPTIONS.E</SAMP> file</BLOCKQUOTE>
<H4 ALIGN="LEFT">Java classes</H4>
When you drop a Java class the EA's of the class are scanned for the arguments and parameters
which are then placed in the tag. These can be set using the included the Rexx script
<SAMP>CLASSEA.CMD</SAMP> Just type at the command prompt <KBD>classea [filename]</KBD> and
follow the prompts. In anyone out there knows where I can find some public Java classes for
EA manipulation let me know, so I can make a nifty Java application to do this.
<H4 ALIGN="LEFT">Images</H4>
These macros recognize JPEGs and GIFs. You can set the default values for the tag arguments
for each image with the script <SAMP>imageEAs.cmd</SAMP> just like you do with Java
classes. Don't worry about setting the height and width for GIFs, those values will be taken
from the files.
<H5 ALIGN="LEFT">GIFs</H5>
The width and height will be taken from the image and automatically entered in the tag.
<H5 ALIGN="LEFT">JPEGs</H5>
If I can ever figure out how to do so with JPEGs it will be done for them as well.
<H4 ALIGN="LEFT">XTML</H4>
<SAMP>XTML</SAMP> is a file extension I made up importable files. It is a good place to
place to put indices and maps. When you drop one you will be prompted as to whether you want
to load or import it.
<H3 ALIGN="LEFT">Tabbing</H3>
The <KBD>CTRL-TAB</KBD> and <KBD>SHIFT-TAB</KBD> keys have been redefined to search for line
for likely to need text entered. If no such place is found the cursor is placed at the end
of the line. If it starts at the end of the line it goes to the next line.
<KBD>CTRL-TAB</KBD> scans right and down and <KBD>SHIFT-TAB</KBD> scans left and
up.
<H3 ALIGN="LEFT">Setting defaults</H3>
The default argument's can be set by choosing the option from the interface sub menu. You will
be prompted for the argument to default and then the value for the argument. This value will
appear in entryboxes or at the top of listboxes, as appropriate. If the value
you enter or choose is proceeded with <CITE>AUTO_</CITE> you will not be prompted for the
argument. If you enter or choose AUTO_#OOPS the tag will be skipped.<BR>
This can be used to turn off tags you never want to use.<BR>
<BR>
<STRONG>Care should be taken when using the AUTO_ feature. If you do not have HTML_IF_ARG_BLANK
set to exit you can get stuck in infinite loops if you set <CITE>AUTO_</CITE>(<I>some invalid value</I>) value
for mandatory arguments. I think I error trapped all instances where this is possible but
I'm not sure</STRONG><BR>
<BR>
The defaults are automatically loaded when the file is loaded. If you can reload them by
choosing it from the menu.<BR>
<BR>
Changes to the defaults are not undoable. You have to change then again manually.
<H2 ALIGN="LEFT">Known bugs and miscellaneous stuff</H2>
I know of no actual bugs. The way I had to handle URL's with the Data Type
<CITE>UniformResourceLocator</CITE> EPM only seems to recognize data types of 18 or fewer
characters. If anyone can figure more elegant solution than what I'v done please tell me.<BR>
<BR>
I didn't include code for the entry of special characters. The file was getting big enough,
although I might add it in the future. The code for frames is in there but commented out
since I've decided that they are <FONT COLOR=#ff0000>EVIL</FONT>. If you want frames you can
uncomment it and recompile it.<BR>
<BR>
I thought about adding a table formatting routine but it required so many special markers that
it was no easier than just entering the tags.
<BR>
I'm not fool enough to think that there is any way I can enforce any kind of shareware payment
scheme. If you find these useful contribute what you consider to be a fair amount to my
Internet account. Send a check to:
<CENTER>
CTS<BR>
8913 Complex Dr<BR>
San Diego CA U.S. 92123-1413
</CENTER>
with a note telling them to credit the <EM>edantes</EM> account. And, of course, anyone can
distribute it.<BR>
<BR>
Send questions, comments. adulation, and bug reports to
<A HREF="mailto:edantes@cts.com">edantes@cts.com</A><BR>
<BR>
<STRONG><FONT COLOR=#ff0000><B>No Warrantee:</B> This is available 'As Is'. If anything bad
happens to you I'm not res</FONT></STRONG>
</BODY>
</HTML>