USER HELP GUIDE

WISH Supernotepad 0.8.0
by David McClamrock <mcclamrock@locl.net>

Based on Tk NotePad 0.5.0 by Joseph Acosta
and "textedit.tcl" by Eric Foster-Johnson



Most of the features of WISH Supernotepad are pretty easy to figure out. In case you need help with any of them, here are some explanations.  As usual with computer menu items, you can open a menu either by clicking with the mouse or by holding down "Alt" and pressing the underlined letter for the menu (e.g., "F" for "File"; then you can select a menu item either by clicking with the mouse or by releasing "Alt" and pressing the underlined letter for the item (e.g., "O" for "Open").  Some menu items have "accelerator" keys, such as "Control+s" or "Shift+F1," to open the items really fast.  To search for help in this User Help Guide, enter text to search for in the text-entry box at the top of the User Help window; then click the "Find" button or press the accelerator key, "F2."  To see if you can get any more help, do it again.


# File menu #

# New:  Use this to close out the text you've been working on and start fresh.  If you have unsaved text, you'll be asked whether you want to save it first.  If you want two files open at once, run WISH Supernotepad again and open the second file in the second window.

# Open:  You can open any file that can be read and edited in the form of plain ASCII text, such as TXT, HTML, WISH (Tcl/Tk) or other program source code, and more.  Word-processing files in formats that can't be read as plain text must be exported to a format consisting only of plain ASCII characters before they can be read or edited in WISH Supernotepad.

# Save (Control+s):  If you have unsaved text, the words "Save changes?" should appear in the title bar.  Press Control+s (hold down "Control" and press "s" with caps lock off) to save a file fast.  If you don't already have your text saved in a file, "Save" will automatically change to "Save As" and you'll be asked to enter a filename.  In any event, "Save changes?" should disappear when you've saved the file and reappear within one second after you've changed the text again.

# Save As:  If your text is already saved under one filename, "Save As" will save it under another name, while leaving the original file the same as it was when you last saved it.  If your text isn't already saved, you can give it a name.

# Insert File (Shift+F1):  Like "Open" except it doesn't get rid of the text you were working on and put a new file into the blank text area; instead, it inserts the text from the new file at the cursor location even if the cursor is already surrounded by text.

# Exit:  If you have unsaved text, you'll be asked whether you want to save it before quitting the program.


# Edit menu #

You can cut, copy, paste, or delete selected text with either the keyboard or the mouse.  To select text, in addition to the obvious method of holding down the mouse button while moving the pointer from one end to the other end of the text you want to select, here are some things you can do.

To add more text to an existing selection (such as when you want to select a lot more than will fit on the screen), hold down "Shift" and single-click the left mouse button at the end of the text to be added.  If you want to select even more, keep holding down both "Shift" and the mouse button, and drag to extend the selection further.  The text will scroll to extend the selection if the mouse pointer reaches the bottom of the text area.

To select a single word, double-click the word with the left mouse button.  To add more words, hold down both "Control" and "Shift" while using the left or right arrow key.

To select an entire line, triple-click the line with the left mouse button.  (If word wrap is turned on, several lines may appear to be selected, but they will appear as only one line if word wrap is turned off--see below.)  To add more lines, hold down both "Control" and "Shift" while using the left or right arrow key.

To keep the selection the same but put the cursor somewhere else, hold down "Control" and single-click the left mouse button where the cursor is to go.

# Cut (Control+x):  Cuts out the selected text and puts it on the clipboard, ready to be pasted in.  Easy.

# Copy (Control+c):  Copies the selected text and puts it on the clipboard, ready to be pasted in.

# Paste (F11):  Pastes in text from the clipboard at the cursor location.  The cursor goes to the end of the pasted-in text, and the text scrolls to the new cursor position if necessary.  You can paste in the same text more than once, so long as you haven't cut or copied any other text more recently.  If you have, the newly cut or copied text replaces whatever was on the clipboard before.  If you cut or copy text from one WISH Supernotepad window and you want to paste it into another, keep both windows open until you've pasted the text; you may lose it if you close the window you cut or copied it from.

# Delete (Del):  Cuts out selected text and doesn't put it on the clipboard; it's gone (although you can still get it back with "Undo"--see below).

# Undo (Control+z):  Undoes the last action performed (e.g., typing a character, deleting some text, etc.).  You can undo an unlimited number of actions, according to the author of Tk NotePad.  (The program code for "Undo" and "Redo" in WISH Supernotepad is taken straight from Tk NotePad.)  I've verified that you can undo more than 20 actions in a row.

# Redo (Control+y):  If you're inclined toward unlimited vacillation, you can redo an unlimited number of actions after undoing them; then you can undo them again, redo them again, and so on *ad infinitum*.  (Ugh!)  If you insist on doing this, "Control+y" is the fastest possible way to do it.  WARNING: If you have more than one WISH Supernotepad window open at once, the actions you "redo" may not be the same as the ones you just undid!

# Select All (Control+/):  Obviously, selects every bit of text in the text area, whether you can see it or not.  What's not quite so obvious is that you can select *almost* all the text by (1) selecting all and (2) then shift-clicking inside the selected portion to deselect some text at the beginning or the end.  (You can do this more than once, and you can do it with any selection, not only one created with "Select All.")  To add text back onto the selection, shift-click outside the selected portion; the part between the selected portion and the place where you shift-click will be added.

# Time/Date:  If you ever want to put the time (in 24-hour format) and the date (in MM/DD/YY format) into your text (e.g., 21:12 PM 07/14/01) without typing in the letters and numbers, this menu item will do it.

# Word wrap off:  Click this to see the ends of your long lines of text disappear over the horizon; click again to see them reappear.


# Search menu #

# Find (Control+F1):  This will open up a "Find" entry box, into which you can type text to search for.  "Control+F1" will open the box faster.  Click "Match case" to find only text with the same capitalization or lack of capitalization (e.g., searching for "OK" won't find "ok" if "Match case" is selected).  Click "Up" to search backward toward the beginning of the text.  To find the first instance, you can either press "Enter" ("Return") or click "Find Next."  To find the next instance, do *not* hit "Enter" again.  (If you do, it will delete the text you just found!)  Instead, either click "Find Next" again or press "F2."  To quit searching before finding all instances, click "Cancel."

# Find Next (F2):  As I was just saying . . . to find the next instance of text you've already started searching for, press "F2" or click "Find Next" in the entry box.  If you'd really prefer to click the "Find Next" menu item, that will do the job too.  (Don't use "Find Next" before you've used "Find"; you'll get an error message if you do.)  Each time an instance is selected, you can delete it or type in other text to replace it before going on to the next instance.  If you want to replace some or all instances with the same text each time, use "Replace."  If you've found all you want, click "Cancel."

# Replace (Control+r):  Opens up a "Replace" entry box, like the "Find" box but with spaces for (1) text to search for and (2) text to replace it with.  "Control+r" opens the box faster.  Press "Enter" or click "Yes" to find the first instance; do it again ("Enter" or "Yes") to replace the first one and find the next one.  Click "No" to skip an instance without replacing it.  Click "All" if you're sure you want to replace all instances without checking any of them.  Click "Cancel" if you don't want to replace any more.

# Go to line:  If you've ever done any computer programming, you've probably received obnoxious error messages telling you there was something wrong with your program at line 666, or wherever.  This menu item will open a little box that (1) tells you what line the cursor is on and (2) lets you type in a line number that you can go to by pressing "Enter" or clicking "OK."  (The lines are numbered as they would appear with word wrap off, not on.)  To stay on the same line after all, click "Cancel."


# HTML menu #

# New-HTML:  Like "New," only instead of a blank text area you get a preformatted document in simple Hypertext Markup Language (HTML).  This document contains color codes for black text (TEXT), blue links (LINK) that turn red when you click on them (ALINK) and stay red after you're done (VLINK), and white background (BGCOLOR).  If you don't like these colors, do this:  (1) Delete the code for the color you don't like, including the quotation marks (for example, "#FF0BCD" is a color code I might well delete on sight).  (2) Under the "Special" menu, click "Color" and select a color you like (see "Color" under "Special menu" below for details).  (3) With the cursor in the place you just deleted the bad color code from, click the colored button at the top of the color selection box; this will insert the code for the color you like.

# Convert to HTML:  Converts all plain text in the text area to simple HTML.  If you have unsaved text, you'll be asked whether you want to save it first.  (Good idea--then you'll still have the plain text if you decide you don't like the HTML!)  Use "Save As" to save the HTML under a different name than the plain text.  If you don't want the HTML after all, click "New," "Open," or "New-HTML" and then don't save your changes.

# Heading (F12):  If you select some text, this menu item will turn it into an HTML heading of the size you select, from H1 (really big) to H6 (really small, probably smaller than ordinary text).  If you enter text in the "HTML Heading" entry box, that text will turn into a heading.  (Don't select some text *and* put some into the box; just do one or the other.)  If you don't do either of these things but you click "Insert" in the heading box, you'll get heading codes and a place to put text between them in your document.  To get none of the above to happen, click "Cancel."

# Font (Shift+F12):  Put this code in your document if you want to make text show up in different sizes and colors when displayed in a browser.  (You can either select the text first or type it in afterward.)  Click one of the "+" number buttons to make the text look bigger than normal size (0), or one of the "-" buttons to make it look smaller.  Click "Open Color Selector" to pick a color; you'll see the color code show up next to "Font Color" in the "Font" selection box.  (For details about the color selector, see "Color" under "Special menu" in this guide.) Then click "Insert Color," "Insert Size," or "Insert Size + Color"--or "Cancel" if you don't want to do this after all.

# Anchor (Shift+F7):  If an HTML document contains a link to another place in the same document, an "anchor" (sometimes called a "target") is what indicates where the other place is.  First you put in the anchor code, which looks like this:  <A NAME="#Anchor Name Here"></A>.  Then you go to where the link is to be inserted, and insert it (see below).

# Link (F7):  You, too, can make links that people can click on to view web pages, send e-mail, etc.!  After selecting this menu item, click one of the buttons in the "Link" box  to put in the right prefix for World Wide Web (WWW), E-mail, File Transfer Protocol, or (FTP).  If you've inserted any anchors and you click "Anchor," the name of the last anchor you inserted will show up in the "Link to URL" entry box after the anchor symbol (#).   The "Other" button won't put in any prefix.  Put the rest of the code for the link (such as "blablabla.org" for a website, "hogwasher@blablabla.org" for an e-mail link, or "file:/home/pa/supernotepad", with no prefix selected, for a file on your computer) after the prefix (if any) in the "Link to URL" entry box; if the entry box contains anything you don't want, just delete it.  If you have some text selected in the text area, press "Enter" or click "Insert Link" after putting in the link code; the selected text will then turn into the link name, which will be underlined in blue (or whatever) when displayed in a browser.  Otherwise, type the link name into the "Show name" entry box and then press "Enter" or click "Insert Link."  If you don't really want to do any of this, click "Cancel."

# Image:  To have an image appear in your document when displayed in a browser, click this menu item and type the "relative" file name of the image (just the name, e.g., "papenguin.gif") into the "Image file name" entry box if the image is going to be in the same directory as the document, or the "absolute" name (including the entire path to the image, e.g., "http://www.penguineer.com/pa/papenguin.gif") if the document might be in a different directory.  "Left" and "right" alignment mean the image will appear on the left or the right side of the screen with text flowing around it; "Top," "Middle," and "Bottom" mean the text will be aligned with the top, the middle, or the bottom of the image.  To let people read about your image even when they can't see it (if they have image loading turned off or they use a text-only browser), put a description of the image in the "Image description" entry box.  If you know the height and width of your image in pixels (the little dots of light that appear on the monitor screen), put them in the "Height" and "Width" boxes.  If you want some blank space or a border to appear around the image, put numbers of pixels into the "Horiz," "Vert," or "Border" boxes.  Then click "Insert" to put all the codes into your document or "Cancel" to avoid doing so.

# List:  To make an HTML list quickly with numbered or un-numbered items, select the style of numbering or un-numbering (bulleting) you want, type each item into the "HTML Link" entry box and insert it by hitting "Enter" or clicking "Insert," and then click "Done" when done.  If you haven't thought of any items yet but you want some numbers or bullets ready in case you think of any, just hit "Enter" the correct number of times and you'll see "<LI>" (list item) codes in your document.  When you think of the items at last, just type each item into your document right after an "<LI>" code (e.g., "<LI>Pa Penguin".  You won't see numbers or bullets in the HTML code, but they'll show up when the document is displayed in a browser window.

# Table:  If a simple list isn't good enough for you, you can make a table with rows and columns.  Click this menu item to get an HTML Table Setup box with spaces for a table summary (like "Image description," only for a table); "Horiz," "Vert," etc., just like in the "Insert Image" box; space inside and between cells, to keep your table from looking too cramped; and buttons to select or deselect a background color for the table.
	After you're done with these, you can click "Make table, no data" for "quick and dirty" insertion of codes for a blank table with the number of (horizontal) rows and (vertical) columns you select.  Then, when you figure out what data the cells in the table are going to contain, just put the data for the cells between the "<TD>" (table data) codes and the "</TD>" (end table data) codes, like this:  "<TD>Ma Penguin</TD>."
	If the combination of quickness and dirtiness doesn't appeal to you, you can create a table and enter the data as you go along by selecting "Make table, enter data."  You'll get an HTML Table Data Entry box where you can type in the cell contents, make a cell spread over more than one row or column, choose how to align the contents of cells or entire rows, and select a different background color for each row or even for every cell if you don't have anything better to do with your time.  (These color codes won't show up in the Data Entry box, but they will in the document when you hit "Enter" or click "Insert.)  Unless you say different by changing the selection in the "Cell type" option menu, the first row of the table will contain "Header" cells (probably shown in bold type in the browser) and the other rows will be ordinary "Data" cells.  (To get the same effect in a "quick and dirty" table, just change all the "<TD>" and "</TD>" codes between the first "<TR>" (table row) and the first "</TR>" (end table row) to "<TH>" (table header) and "</TH>" (end table header).)  When you've hit "Enter" or clicked "Insert" enough times to fill in the top cell of each column you want to appear in the table, click "Begin new row" to start another row.  Don't forget to click "Done" to insert the codes that go at the end of the table.

# Paragraph (F1):  Web browsers don't care how many times you hit "Enter"; they want to see "<BR>" to display text on a new line, and "<P>" to leave some blank space before a new paragraph.  It's considered better form to put "</P>" at the end of a paragraph, too (although, in simple HTML, you don't really have to).  So, if you've already written your paragraph, you need to select it (triple-clicking should work) before you press "F1" or click this menu item to put "<P>" before and "</P>" after the paragraph.  Otherwise, you can type in the paragraph after you've inserted the codes.

# Line Break (F9):  Puts in a "<BR>" code to make the browser display the following text on a new line, but without extra space above the new line.  For this, you don't need to select the text before pressing "F9" or clicking this menu item.

# Italics (F8):  You can use "<I>" for italics, but "<EM>" is considered better form.  "</EM>" has to be at the end to stop the italics.  Either select the text to be italicized before inserting the codes, or type the text in afterward.

# Bold (F6):  For bold text, "<STRONG>" is considered better form than "<B>."  To say "Thus far and no farther" to boldness, "</STRONG>" has to go at the end.  Select the text to be emboldened first or type it in afterward.

# Center (Shift+F6):  If you want your entire HTML document to have equally squiggly margins on the left and the right, insert a "<CENTER>" code first and then type in your text.  Otherwise, type in only the text you want centered, or select it first.  (This code will work to center a table horizontally, too.) After the point where "</CENTER>" (end centering) appears, the margins won't squiggle any more.


# WISH (Tcl/Tk) menu #

# New script:  If you have any idea how to write computer programs in the almost superbly simple Tcl/Tk programming language, to be run by the "WISH Interpreter" master program, this menu item will start you off right by giving you the first few funny-looking lines for the program script.  If you don't have any idea how to write the programs but you'd like to learn, you might try the books that enabled me, starting with approximately no programming experience, to write WISH Supernotepad (except for the "Undo" and "Redo" code that comes from the original Tk NotePad, which I still don't understand!).  These books are *Graphical Applications with Tcl and Tk* by Eric Foster-Johnson and *Tcl/Tk Programmer's Reference* by Christopher Nelson.  With the help of the relevant parts of these books, you should actually be able to read the program code for WISH Supernotepad and figure out how it works (at least until you get to the "Undo" and "Redo" stuff at the end).

# Curly braces { } (F3):  Very important in Tcl/Tk program code.  You have to have a "}" for every "{"--an "unbrace" for every "brace"--and they have to be in the right places too, or else you get obnoxious error messages.  Hitting "F3" or clicking this menu item will give you a "}" for every "{" to help you keep track.

# Square brackets [ ] (F4):  Likewise, you need a "]" for every "["--an "unbrack" for every "brack."  Hitting "F4" or clicking this menu item will give you one.

# Run selected code (F5):  You've actually written some Tcl/Tk program code and now you want to find out whether it works?  Select the code and hit "F5" (or select this menu item) to run it.  If all goes well, you'll see a window open up with the widgets you've configured to run your commands, and you can test them to see if they work right.  (Just don't test any widgets that invoke the "exit" command; if they work, they'll shut down WISH Supernotepad as well as the program you're testing!  Instead, click the "close" box on your program's title bar when you're done testing the program.)  If all doesn't go well, click "Stack Trace" in the obnoxious error message box to see the WISH Interpreter's best guess about where and how your program went wrong (which is usually a pretty good guess).

# Grid config:  As you'll learn early on, if you haven't already, you have to use the "grid," "pack," or "place" geometry manager to make your Tk widgets show up after you've created them.  I usually use "grid."  This menu item will save you some keystrokes for each widget.


# Special menu #

# HTML:  Opens up a box of special-character buttons that you can click to insert strange-looking sequences of characters into an HTML document, such as "&cent;" and "&pound;" (which show up as a cent sign, "¢," and a pound sign, "£," in a browser).  There are legal symbols, fractions, foreign characters (mainly for French, Spanish, Portuguese, and German), and more.

# Plain Text:  You see the same special-character box as for HTML, but what you see is what (in plain text) you get.  Voilà:  & < > ¡ ¢ £ § © ® ¶ ± ¼ ½ ¾ ¿ À Á Â Ã Ä Æ Ç È É Ê Ë Í Î Ï Ñ Ó Ô Ö Ø Ú Û Ü ß à á â ã ä æ ç è é ê ë í î ï ñ ó ô ö ø ú û ü !  (They're bigger in the box, so you can see them better.)

# Color:  Opens a box with sliders to change the proportions of red, green, and blue in a color you might or might not want to select, and a big button to display the color.  The sliders go from 0 (none) to 255 (maximum).  The big button displays the hexadecimal (base 16) code for the color in black letters if the color is light or white ones if the color is dark.  For example, if you select a color with 255 parts red, 204 parts green, and 153 parts blue, the hexadecimal code (displayed in black letters) will be "FFCC99" because "FF" in hexadecimal numeration means 255, "CC" means 204, and "99" means 153.  If you click the big button, the hexadecimal code (in quotation marks) will be inserted into your document at the cursor location.  Click the "Close" button to select a color for use in HTML code and to close the box.


# Help menu #

This is where you came in.  "About" gives you a little title box with an "OK" button in it.  "User Help" gives you this User Help Guide.  You already know that.  If you're a geek or you want to read a few mildly geeky things about how I made this program, read "Geek Notes."  To send me inquisitive or helpful messages with no flames in them, e-mail me at <mcclamrock@locl.net>.  I hope you like this program, or find it useful, or both!

David McClamrock
August 2001