REBOL [Title: "Web File Editor"] ; required header view layout [ ; Create a text entry field containing a generic url address for ; the page to be edited. Assign the label "page-to-read" to the ; text entered here: page-to-read: field 600 "ftp://user:pass@website.com/path/page.html" ; Create a multi-line text field to hold and edit the HTML ; downloaded from the above url. Assign the label "the-html" to it: the-html: area 600x440 ; Layout the next three buttons on the same line: across ; Create a button to download and display the HTML at the url given ; above. btn "Download HTML Page" [ ; Whenever the button is clicked, download the HTML at the url ; above, insert it into the multi-line text area (by setting the ; text property of that field to the downloaded text), and update ; the display: the-html/text: read (to-url page-to-read/text) show the-html ] ; Create another button to read and display HTML from a local file: btn "Load Local HTML File" [ ; Whenever the button is clicked, read the HTML from a file ; selected by the user, insert it into the multi-line text area, ; and update the display: the-html/text: read (to-file request-file) show the-html ] ; Create another button to write the edited contents of the multi- ; line text area back to the url: btn "Save Changes to Web Site" [ write (to-url page-to-read/text) the-html/text ] ; Create another button to write the edited contents of the multi- ; line text area to a local file selected by the user: btn "Save Changes to Local File" [ write (to-file request-file/save) the-html/text ] ]