July 20, 2007
Introduction To Windows Live Writer
DRAFT
OBJECTIVE
The objective of this tutorial is to demonstrate the basic skills required to write and upload a standard post to the User’s Knowledge Base (UKB), using Windows Live Writer. It does not cover advanced features and exceptions.
SPECIFICATION
Windows Live Writer (WLW) is a free blog editor developed by Microsoft. At the time of writing it is in beta and does not have a manual. The beta version can be downloaded from: http://get.live.com/betas/writer_betas
The file version available for download in July 2007 was:

This tutorial was written using Beta version 1.0, installed on a computer with Windows XP Home as the operating system and Internet Explorer 7 as the browser.
Support is available via the link at the bottom of the download page or from: http://windowslivewriter.spaces.live.com/blog/
INSTALLATION
To install Windows Live Writer run the installer and enter inputs to the Setup Wizard as follows:
1) UKB authors already have a weblog (DO NOT create a Windows Live Spaces Account); click on Next >.

2) Select Another weblog service then click on Next >.

3) Enter the Weblog Homepage URL as shown and then enter your Username and Password as provided by support [at] amibroker.com then click on Next >.

4) The installer will run through a series of tasks that synchronizes your installation to the UKB site including the Weblog Name, Capabilities, Formats, Categories and other settings.

5) When the installer ‘asks’ for permission to upload a temporary post; click on Yes.

6) The installer will make an ‘announcement’ when the configuration is complete; click on Finish.

7) Windows Live Writer will open on your desktop.

The Sidebar, which can be opened or closed by selecting View > Sidebar from the Menubar, is open by default after installation.

The Properties option can also be selected from the same menu, or, toggled on or off by using the double arrows at the right side of the Properties Sub-panel.

The blog site settings, as detected by WLW, can be found at Tools > Accounts > Edit> Capabilities > View Capabilities. They can also be refreshed by using the Update Account Configuration button at the same location as the Capabilities link.
OPTIONS
For this example the defaults, as installed, have been accepted, with only a few minor exceptions.
Refer to Tools > Options:
Tools > Options > Preferences

Tools > Options > Accounts

Tools > Options > Accounts > Edit > Account

Tools > Options > Accounts > Edit > Images

Tools > Options > Accounts > Edit > Editing

Tools > Options > Accounts > Edit > Advanced

Tools > Options > Blog This

Tools > Options > Spelling

Tools > Options > Link Glossary

Tools > Options > Plugins

Tools > Options > Web Proxy

Tools > Options > Ping Servers
VIEW
WLW has four options that can be selected from the View menu; Normal, Web Layout, Web Preview and HTML Code.

Whenever WLW is started it opens in Normal view, which is the default. In Normal view the main window is in editing mode and it functions in a similar manner to a word processing program.
The Web modes are for viewing only and they have little practical value. As well as that, some code might not render the same on the UKB site as it does in WLW e.g. AFL formulas are only ‘formatted’ after uploading.
Note: to preview a post the recommended method is to upload it as a draft and open it online from the Manage Panel. (For information on previewing draft posts refer to: Introduction To The Admin Center )
In HTML view the underlying code can be read and edited if necessary.

WRITING
By default, WLW opens with a new, or unsaved draft, in the Editing Window. (The status of the post is reported in the bar at the bottom of the screen.)
Enter the Title of the post.
![]()
Enter text into the body of the post. (The text will wrap automatically with single line spacing. The Enter key will insert a new paragraph with a single line space.)
Limited formatting can be applied to the text by using the icons on the Toolbar.

Additional formats can be applied from the Format menu.

A subset of the available formats can be accessed by right clicking inside the Editing Window and selecting from the context menu that appears.
EDITABLE ITEMS
The body of a post comprises formatted text plus editable items that can be inserted into the post.
There are five classes of editable items; Hyperlinks, Pictures, Tables, Maps and Tags (only the first three will be considered in this tutorial). Each class has it’s own icon to distinguish it from the others. Any class can be inserted by selecting the relevant icon from anywhere in the program where it appears. There are four places where editable items can be selected.
To insert an editable item select the icon from:
1) The Insert menu.

2) The icon on the toolbar.

3) The Insert drop-down menu on the Toolbar.

4) The Insert menu box on the Sidebar.

Once inserted into a post each item has it’s own specific reaction to mouse input.
|
LEFT CLICK |
RIGHT CLICK |
|
| Hyperlink | opens the link | opens a context menu |
| Picture | selects the object for sizing and moving plus opens the Properties Center in the Sidebar |
same as left click plus opens a context menu |
| Table | positions the cursor in the table | opens a context menu |
USING IMAGES
Images can be used to illustrate a point.
To insert images into a post:
1) Position the cursor in the Editing Window where the image is to be inserted.
2) Click on an Insert Picture icon,
3) Use the View menu in the Insert Picture Window to change to Thumbnail view. (This will make it easier to select the correct image.)

4) Hover the mouse over the image to be inserted and a message-box, that gives the Dimensions of the image, will appear. The image needs to be less than 700 - 800 pixels wide to fit into the post without adjustment. Re-sizing images should be avoided, if possible, as it will cause the images to lose quality.

5) Pick the image required and click on the Insert button. (The selected image will be inserted into the Editing Window at the location of the cursor.)
After an image has been inserted into the post the image defaults should be set.
To Set The Image Defaults:
1) Click on an image to select it. (The Image Properties Window will appear in the Sidebar.)
2) click on the Image tab and change the settings to Text wrapping - Inline, Margins - No Margins, Borders - None and Link To - None, then Save the settings as default (the link is at the bottom of the Image panel).

(Note that this is a one-off requirement that should be set immediately after the first image is inserted. Thereafter the settings can be changed on an individual basis, as required, but it is not recommended to use Borders and Link To in any other way).
In the advanced panel images can be resized on an individual basis, although once again it is not recommended.
The size of an image can be changed manually by over-typing the Width or the Height into the input boxes. If the Width to Height ratio is locked it is only necessary to type in one of the dimensions and enter it. The second dimension will automatically change.

There are also three pre-set options; Small, Medium and Large, that can be picked by from the Image size drop-down.

The pre-set defaults can be changed by clicking on the protractor image at the side of the Image size box and ramping the Height or Width up or down in the Default Image Size window. Once changes have been made the new settings automatically become the default.

The final panel allows users to apply special effects to images. Effects are not considered in this tutorial, which is restricted to basic procedures.
Tips and Tricks for Managing Images
1) Give the files a meaningful name on the local computer, and append a progressive number, to identify them. DO NOT enter an alternative text name. (This will synchronize the image ‘name’ in all places where it is used locally, and on the UKB site) :
- the local filename will become the filename on the UKB server by default.
- the local filename will become the Title on the UKB server, by default (the Title will be displayed if the mouse is hovered over the image in WordPress editing mode)
- the local filename will become the Alternate text name for the image, by default (the alternate text will be displayed in posts, instead of the image, if the image has been deleted from the server and also if the mouse is hovered over the image in a post)
Synchronizing the image ‘names’ makes it much easier to track the files across the operations that occur, and between the local computer and the UKB server.
2) Images can be positioned by using the alignment commands:
- position the cursor adjacent to the image (move the cursor ‘pointer’ until it is immediately to the left or right of the base of the image and click once)
- right click in white space inside the Editing Window to open a context menu
- select Align > Left, Center or Right as required
3) Images can be moved by cutting and pasting:
- click on the image to select it
- right click inside the image to open a context menu
- select Cut from the context menu
- position the cursor in the required spot for the image
- right click in white space to open the context menu again and select Paste (the image will be pasted into the post at the location of the cursor).
4) Images can be moved by dragging them with the mouse:
- hover the cursor ’pointer’ over an image (the cursor will change to a moving cursor ‘pointer’)
- click and hold the left mouse button on the image (the moving cursor pointer will change to an arrow with an opaque rectangle attached)
- drag the rectangle to where the image is to be inserted and release the mouse button to insert the image
5) Images can be deleted:
- click on the image to select it
- hit delete on the keyboard to remove it from the post
6) Images can be replaced:
- delete the image that is to be replaced from the post (captured images represent an investment in time so it is recommended that they are kept in case there is a need to reinstall them)
- capture the new image that is needed to replace the old and give it a unique name (do not overwrite the original image, even if it is not required, as WLW will not upload an image, to the server, with the same name twice)
- insert the replacement image
7) Images can be deleted or replaced after publishing:
- download the post for editing (refer to instructions in a later section of this tutorial)
- delete or replace the image (use the method described above)
- re-publish the post
- go online to the WordPress administration Center and manually delete the unwanted image file (refer to ‘Introduction To The Admin Center’ for instructions)
ENTERING AFL FORMULAS
To prevent conflict between AFL formulas, and the HTML code used to ‘write’ posts, a customized AFL tag has been provided by AmiBroker for use with Blog Editors. AFL tags, or markers, perform a similar function to the <code> tag, which is used in WordPress to distinguish operating code from example code.
To enter an AFL formula from AmiBroker:
1) Go to Tools > Preferences > Editor in AmiBroker and uncheck Copy as HTML by clicking in it.

2) Open the AFL formula in Formula Editor and copy it to the clipboard.
3) Right click in white-space in the WLW Editing Window to open a context menu.
4) Select Paste from the context menu (the formula will be pasted into WLW with limited formatting).
5) Type AFL markers before and after the formula code.
1 2 3 4 5 6 7 8 | /*P_BarsInYear*/ InYearFlag = IIf(DateNum() >= 1060101 AND DateNum() <= 1061231,1,0); InYear = Cum(InYearFlag); Plot(InYear,"BarsInYear",2,2|4); // Logic. // line 3 returns one if a bar is within the calendar range, or zero if not, and assigns it to the InYearFlag variable; // line 4 cumulates the ones from line 3 and assigns the result to InYear; // line 5 plots the cumulated result in a chart; |
Note: In WLW Web mode the appearance of the formula will be the same as in Normal view but on the UKB site the formula will be rendered in the standard format.
After entering a formula leave a one line space before continuing to enter text (this prevents the formula’s format from spilling over into subsequent entries).
(Note that in HTML view <code></code> tags have automatically been added to the beginning and end of the formula).
Inserting links
Links to web-sites can be established simply by typing in the URL to the relevant page. The link will be automatically generated once the text is entered e.g.
They can also be inserted by using the Insert Hyperlink command from the Insert menu box in the Sidebar:
1) Click on the Insert Hyperlink. (The Insert Hyperlink Window will open).- also at insert menu and toolbar

2) Type the web-page address into the URL input box, or, copy and paste it from a browser or other source. (When the address is entered WLW will synchronize with the recently viewed address list in Internet Explorer. Any address can be selected from the list if desired.)

3) Type a name for the link into the Text input box. (The name will be used as the link text in the post.)

4) Check the option boxes Open link in new window and Add to link glossary then click on OK (A link to the URL will be entered at the current location of the cursor e.g. AmiBroker homepage )
The glossary provides a shortcut method to use the link again at a later date:
1) Open the Insert Hyperlink Window.
2) Click on Link To to open a drop-down menu and pick Glossary Entry. (The Select Link from Glossary Window will open.)

3) Select the required link from the Glossary list by name or URL.

a link can also be established to another UKB post, including a draft.
1) Open the Insert Hyperlink Window.
2) Click on Link To to open a drop-down menu and pick Previous Post. (The Link to Post Window will open.)

3) Select a file to link to from the Recently Posted list or the AmiBroker Users’ Knowledge Base list. (If the required post isn’t in the list increase the number of items to show and click on the refresh icon.)

4) Enter a title for the link and check the boxes to Open link in new window and Add to link glossary, then click on OK

A link that opens the selected post in a new window, will be inserted at the current location of the cursor.
Inserting tables
To insert a table:
1) Position the cursor in the Editing Window where the image is to be inserted.
2) Click on an Insert Table icon (the Insert Table window will open).

3) Enter the required number of rows and Columns by over-typing into the input boxes. Set the width of the table in pixels (1000 is the maximum allowable) and click on OK.
This will insert a ‘blank’ table into the post at the current position of the cursor.

To enter data into the table:
1) Hover the cursor pointer over a cell and click to position the cursor.
2) Type in the data and use the Tab or the Arrow keys to move between cells.

To format a table:
1) Right click anywhere inside the table to open a context menu.

2) Select Table Properties to open the Table Properties window.

3) Check Show table border set to 1 pixel to add a border to the table.
| A | B | C | D | E | F | G | H | I | J |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | 1 |
| 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | 1 | 2 |
4) Use the other commands listed in the context menu to ‘format’ the table as required:
- position the cursor as a marker in any cell and Insert, or Move, the rows and columns around it
- position the cursor as a marker in any cell and Delete the table, row or column
- position the cursor as a marker in any cell and use Column Properties or Row Properties to customize the width or the height
- select multiple cells by holding down the left mouse button and dragging the cursor across the required range
- use the Clear Cell(s) command or the Delete key to remove data from selected cells
- use the Cell Properties option to align data within selected cells
Tips and Tricks for Using Tables.
1) Tables can also be used, without a border, to create ‘tabulated’ rows and columns.
Note: the border ‘outline’ will show in the WLW Editing Window but not in Web view.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | 1 | 2 | 3 | 4 |
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | 1 | 2 | 3 | 4 | 5 |
| 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
2) To change the width of a column:
a) hover the cursor pointer over the border until a moving cursor appears,

b) click and hold the left mouse key while dragging the border to the required position.
Note: dragging borders only works with with column width and not row height.
3) To delete a table select all cells and hit the Delete key.
4) To replicate a table select all the cells and copy the table. Then position the cursor where the table is to be inserted and paste.
5) Limited formatting can be applied to the data within cells be selecting them and using the available formatting tools e.g. clear, undo, redo, bold, italics, underline, color, copy and paste.
Attaching Files
Files can be exchanged between users by attaching them to posts.
WLW does not provide a ‘graphical’ method to attach and upload files. A work around can be used.
To attach files to a post e.g. a plain text file:
1) give the file a meaningful name
2) save the file to a local drive,
3) Login to the WordPress Admin Center and upload the plain text file,
Note: refer to Introduction To The Admin Center for details, and TBA
4) after uploading select the URL, from the Upload Sub-panel input box, right click inside the selected area to open a context menu and copy the address,

5) return to WLW and position the cursor in the post where the link to the attached file is going to be inserted,
6) click on an Insert Hyperlink icon
The Insert Hyperlink Window will open with http:// automatically selected.
Note: when selected it will be highlighted in blue.

7) hit the Delete key to clear the URL input box and paste in the address copied from the UKB. Then type an identifying name into the Text input box and click OK.

8) The Insert Hyperlink box will close and a link to the file on the server will be inserted.
Example Attachment - Plain Text File
Note: the link is valid for any Web view, including WLW Web Preview or UKB Viewing or Previewing.
A file can also be attached to an image.
To attach a file to an image:
1) insert the image into the post in the normal way,
2) right click on the image and select Hyperlink from the context menu that opens,

3) type or paste the URL of the file into the input box and click OK.

The file will be attached to the image.
To change the ‘title’ of a ‘linked image’:
1) select the image,
2) open the Advanced panel from the Properties Center that opens in the Sidebar
3) type a meaningful description for the link into the Alternate text input box

When the mouse is hovered over the image readers will be able to see the Alternate text message.

Note: that material within attachments will not be included if the post is searched or printed.
MANAGING POSTS
WLW has an integrated post management system.
At installation a My Weblog Posts folder is automatically setup in My Documents. The folder contains two sub-folders; Drafts and Recent Posts. When a new post is saved as a local draft it is stored in the draft folder. When it is posted to the Weblog as a draft, or published, it is moved from the Draft folder to the Recently Posted folder.
Files can be opened or deleted by using a post browser window.
To browse post lists:
1) click on the Open icon on the Toolbar,

2) or open the browser from the File menu,

The browser will open.
The number of posts listed can be set by picking a number from the Show items drop-down.
The list can be refreshed by clicking on the refresh icon.
Drafts can be opened or deleted from the Draft Folder by selecting Drafts in the left panel to view the and picking the required post from the list presented.

Drafts can be opened or deleted from the Recently Posted Folder by selecting it in the left panel and picking the required post from the updated list.
Note: posts deleted from the RP folder will also be deleted from the UKB site (can’t be reinstated).

Author owned posts can also be opened from the AUKB list - posts by other Authors are listed bit can not be opened or edited.

Saving drafts
As writing progresses a post can be Saved as a Local Draft from the File menu.

Drafts can also be saved using the Save Draft icon on the toolbar.

(The icon drops down to provide three options for managing drafts.)

The status bar description will change to show that the draft has been saved.
The post will be saved in My Documents/Drafts and a link to the file will appear in the Open menu-box in the Sidebar.
Thereafter the file can be opened directly from the Sidebar link or the File Management Center. - click the link in the sidebar (the post will open directly in WLW),
Interim backups
As an interim backup, between sessions, an incomplete post can be published as a draft. (Note that the copy uploaded to the UKB server will not be visible to the public and will not be distributed with RSS Feeds).
To publish as a draft:
1) Open the post from the Drafts link in the Sidebar menu or the File Management Center,
Open the drop-down list using the Save Draft icon on the Toolbar.

2) Select Post Draft to Weblog from the menu list.

3) or select Post Draft to Weblog from the File menu

3) If Check spelling before publishing is selected in Tools > Options > Spelling the Check Spelling Window will open, provided there are spelling mistakes in the document. If there are no spelling mistakes in the document the spell-check will be completed silently and the window will not open.

When all spelling tasks are complete the Check Spelling Window will close and the upload will proceed automatically. A dialog box to confirm that the Draft is being published will open.

After uploading is complete the dialog box will automatically close and a copy of the post will remain in the Editing Window.
The status bar description will change to show that the post has been saved.

The file will be moved from the Draft folder to the Recently Posted folder and the Open menu in the sidebar will change to reflect that.

Editing Posts
Posts can be downloaded from the UKB site for editing locally.
To download and edit a post:
- 1) open the post from the Recently Posted link in the Sidebar menu or the File Management Center,
- 2) edit the post,
- 3) re-publish the post as a draft.
WLW will follow the same procedure used when publishing a draft the first time.
Publishing Posts
The status of a post can be changed from local draft or weblog draft to published from the local computer - The procedure is the same for local drafts and weblog drafts.
To publish a draft:
1) open the post from the Sidebar link or the File Management Center,
2) click on the arrow in the Set categories input box at the bottom of the WLW screen (the categories list will open),

3) tick the checkbox to elect the Category that the post will be filed under,

4) select Publish from the icon on the toolbar
%) or select Publish To Weblog from the File menu

WLW will follow the same procedure used when posting a draft except that the Post Status, in the WordPress Admin Center, will be changed to Published (for additional information on Post Status refer to Introduction To The Admin Center ).
Backup
All files uploaded to the UKB server are routinely backed-up by admin.
There are two ways to make a local back-ups for those who want to take additional precautions:
1) immediately after publishing, the local ‘master’ copy remains open in the WLW editing Window. Clicking on Save Local Draft will restore a duplicate to the Draft folder. The draft copy can be backed-up and restored in the normal way.
2) a copy of the post can be made at any stage and pasted into a Word file for saving. If it becomes necessary to restore a post backed up as a Word document to the server, it can be converted to an HTML post and uploaded in the usual way. (For information on copying Word documents into WLW refer to: Converting Word Documents To Posts).
ACCESSING THE WEBLOG
The Admin Center can be directly accessed from within WLW provided that users remain logged in.
To remain logged in to the Admin Center:
1) obtain a Username and Password from support [at] amibroker.com
2) click on the Manage Weblog link in the WLW sidebar,

3) or click on the Weblog icon on the Toolbar,

4) select Manage Weblog from the Weblog menu (the Login Window will open),

5) enter your Username and Password,
6) check Remember me,
7) then click the Login button.

Note: the sustained login stores the logged user in a ‘cookie’ on the local computer. It may not work for those who have disabled their ‘cookies’.
Once permanently logged in, the Manage Weblog link in the Weblog menu list will take users straight to the Dashboard.

From there users can cross to the Manage sub-panel where files can be uploaded and attached to the post. (For information on working with the Admin Center refer to: Introduction To The Admin Center and for information on uploading and attaching files refer to Quick Posting).
The Weblog can also be viewed from links within WLW. Clicking on the View Weblog link in the Weblog menu lists will open the UKB at the homepage for viewing published posts.
EXCEPTIONS
There are some exceptions to the rule encountered when using WLW. Authors are encouraged to join the Authors Forum to report and discuss exceptions or log them via comments attached to the posts listed under Contributors.
Exceptions noted to date:
1) The bulleted lists ‘format’, as applied in WLW, does not work in WordPress. Unordered lists will appear as indented bulleted lists in the WLW Preview but after uploading they lose the bullets and the indents.
2) Paragraphs markers can not be turned off in WLW. Lists can be entered, but each line will be spaced, which produces a post with a ‘gappy’ appearance.
Note: the spacing default in WordPress is also larger than the default in WLW so this exacerbates this tendency.
3) Special characters e.g. <>&” and (spacebar) are automatically converted to their HTML named entity reference by WLW. One exception is the at symbol which can become a mail: to link. (For additional information on using special characters in HTML refer to: Introduction To Editing).
4) Using code as a <tag> is standard practice in HTML editing. It has been customized for use in UKB posts and it’s use is ‘reserved’ for entering AFL formulas. At the time of writing line-space and white-space are not preserved when viewed at the UKB site, although they appear as such in the WLW initial draft.
CONCLUSION
This concludes the Introduction To WLW tutorial in which the basic procedures required to upload a post were demonstrated. Advanced techniques were not included. Other exceptions, that have not been noted at this stage, might be found in the future. Authors are welcome to experiment with advanced techniques and workarounds etc and log the outcomes via the Authors Forum, comments to the Contributor posts or write additional posts if enough new material comes to hand.
Note: experimental posts can be uploaded as a Draft to the ~Test category.
add - workaround for formula line space and whitespace
add - error messages - Internet unavailable - post deleted on line - no permissive to edit
add - use preview to check links
add - custom code - subscript superscript etc (or refer Code Editor)
add - copy and paste link directly into WLW editing window
Filed by brian_z at 1:14 am under Using Blog Editors



.NET Framework version 1.1 must be installed before WLW can be installed, it can be downloaded from:
http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3&displaylang=en