Short: (1,9b/1.9bXl) Shows HTML e-mails with YAM mail client. Author: Rofdolfo Ignazi rodign@inwind.it or rodign@tiscali.it Uploader: Author Version: 1,9b/1.9bXl Type: comm/mail Name: YamHTML.yam or .rx Legal: FreeWare Distribution: Unlimited for non commercial use otherwise ask me. AuthorWebSpace: http://web.tiscali.it/no-redirect-tiscali/amyroad/ Some info about my Arexx script: It is used to show HTML pages (or e-mails in HTML format) and embedded images, if there are, downloaded along with e-mails using YAM mail client for Amiga. It uses various Amiga browsers. Note For All Users: I am very interested to have e-mails which gives you some problem (if they are not private issues), I need them to test the script and, hopefully, find out the problem. A brief description of the problem would be useful. If you send me the e-mails it's better to send them as attachments in raw format. To get a raw format you may use save from the YAM message menu when you are on the reading window. Chapters: Updates, Installing, Usage, Behavior, Sideffect, Law. ------------------ Updates: 1,9b/1.9bXl note: The name of the script now enclose the version too, so you have to change your setting according to it. Improved compatibility for very rarely encountered e-mails with images: Now, I think, it should show correctly at least 95% of e-mails. Like AWeb, now Ibrowse too, brings its screen to the front on showing the page. Like AWeb now Ibrowse (2.3 up) flushes the images from memory cache before showing a new page. A general revision to the code. 1,9a/1.9aXl note: Some more bad HTML recognition. Now an HTML file is intercepted regardless to its position in the attachment list. Now the temporary name is not always "temp.html" but only if the attachment hasn't a name of its own or is the email itself which of course hasn't a name. If the first HTML file refers to other HTML files and they are also present, they will be shown on clicking the links. This permits to compose e-mails with more than one HTML attach and these may refer to each other. Several bug fixes. The file YamHTML.del has also been touched. So, if you use it, replace it with the new one. `YAMhtml19aXL.yam' Into the pacage you will find a special copy called YAMhtml19aXL.yam, this is the same as YamHTML.yam 1.9a but has implemented the code to show MS excel documents. To see them you need to have xlhtml 0.5.1 or up by Charles Wyble from Aminet in your C: directory. Anyway, I strongly advise to use a patched version of that program called xlhtml-pcd, I patched it with an hex editor in order to look for the Amiga temporary dir T: instead of tmp:. If xlhtml-pcd is present in C: the script use it otherwise set an assign for tmp: in order to to use the the original xlhtml. You will find the patched one on the download section of my web space (look above). 1.9 note: Again with compatibility: Now it can manage weird e-mails, at least all I have got trough. Now it manages the background images too. But this option may be disabled in the script setting lines gaining a little in speed, AFAIK html e-mails with background images are very few. For some e-mails generated by a PC mailer called IncrediMail 2001, it's possible to see them partially correct but you must have base64decode on your c: directory, this is because Yam seems to misunderstand the format of this mailer. You can get more info about this just asking me. Many other enhancements and refinements to the code. A change has been also made on "YamHTML.del" file. 1.8d note: More compatibility with emails containing images. Now it should render all emails containing images correctly. Now the auto explaining script to set the environment variable is called YamHTMLyamPREFS and it is also possible to set SimpleHTML parameters from it (requested from SimpleHTML users). It is possible, now, to set an alternate temporary directory in-place of T: but only editing the script in the specified setting line. And for them who use YamHTML.del script on exiting Yam, they must set the same dir on this sript too. Some internal optimizations and some changes not useful for the user to know. 1.8c note: Some more bad HTML pages recognizing. Re-implemented code for starting Voyager automatically (read behavior chapter), but beware, starting V from inside the script still crashes my machine. This version run nicely under Yam 2.4 and previous versions. 1.8a note: Sometimes (rarely) it did not recognized HTML files if they were placed as the body of the mail. It did not displayed images if there were one or more spaces on their names. 1.8 note: The icon driven batch file for the configuration now sets all the parameters. (It may be used instead of editing the first script lines 3 to 7 because it overrides this internal setting -see next Note-). The option to choose between being asked or not when displaying an html page is now simplified by a sheer yes or not that also can be set by the batch file. Adapted the documentation to this new version. I hope it's clear enough. 1.7c-d Note: (Not pubblic.) Among other fixes, resolved a bug which blocked Yam if a bad configuration. Added an icon to click to easily configure for the browser to be opened and the in new window option. It writes an local environment variable called yam0html which when exists the program overrides the configuration on its first lines and don't ask you for the browser of your choice. Remember that the prog always uses an already running browser regardless of the configuration. And if you like to use Voyager you must start it first manually, read on for more details. The "in new window" option is valid for Voyager too. 1.7b Note: Added a control on a never happened event ( but who knows ? ). and another minor but useful change. For Boing Bag 3.9-2 users: It may happen that AWeb, if opened on its own screen, remains stuck to the front and can only be dragged down. It depends of the new exec.library, the cure is: SetPatch SKIPROMUPDATES exec.library on the startup-sequence. Installing: Installing has been updated to 1.8. First of all you'll have to edit the first script lines 3 to 7 to set your browsers paths and names and the other two options, modifying the preset lines to your needs. Don't use MultiView as Default it don't unlock files, use SimpleHtML instead. There are two ways for installing it: 1) » Copy the file YamHtml.yam into the Rexx directory inside YAM:. » Start YAM and press config button or select Configuration from the Settings menu. » Click on Arexx to the left list of options of the configuration window. » Scroll the Scripts list on the right until you see 'When reading a message' option, then click on it. » Find the file using the Script gadget at the bottom, the string gadget must show: YAM:Rexx/YAMhtml.yam » Choose Arexx in the cycle gadget. » It seems to work fine regardless of the 'Wait for termination' checkbox perhaps it is better to check it, just try it. » 'Open console window' checkbox may remain unchecked. » Click on Save. » Done 2) » Copy the file YamHtml.yam into the Rexx directory inside YAM:. » Start YAM and press Config button or select Configuration on the Settings menu. » Click on Arexx to the left list of options of the configuration window. » Look for the first free 'Scripts' menu entry (written in black are free) then click on it. » Find the file using the Script gadget at the bottom, the string gadget must show: YAM:Rexx/YAMhtml.yam . » Write YAMhtml in the 'Name' string gadget. » Choose Arexx in the cycle gadget. » It seems to work fine regardless of the 'Wait for termination' checkbox perhaps it is better to check it, just try it. » 'Open console window' checkbox may remain unchecked. » Click on Save. » Done Usage: Usage has been updated to 1.8. As there are two ways for installing it, there are two for using it too: Choosing the first installation method (preferred) the program automatically checks if there is an HTML document to be seen and, accorcing to the setting, asks you if you want or not see it as HTML or directly shows it up. With the second method the program remains inactive until you call it by the Scripts menu. Behavior: Behavior has been updated to 1.8d. If an Amiga browser is running (AWeb,IBrowse,Voyager or SimpleHTML) the program uses it, otherwise it will ask you to choose one. (This only once in an Amiga session). If an Amiga browser is not running and you have been asked once to open one, the program reopen the browser you had first choosen. But if you,in the meantime, have changed your mind, you may change your browser by closing the one you are using and opening a different one by hand. If you are on line with Genesis or Miami and one of the above browswrs is running the script will let the browser to get the doc. related pictures from the net. The script now puts the browsers window (for AWeb the screen too) to the front if the variable NewWind in the setting lines of the script is set to "YES". Read note 1.8 and 1.8d for more info on setting. OBSOLETE (Just as reminder. It seems Voyager has no problems with Yam2.4p1): In this version, 1.7, I decided to cut off the option to start Voyager from the prog. bacause it crashes my machine on starting Voyager, precisely while loading cookies, I tried to take the piece of code that does the job and run it as an Arexx macro from the shell and it opens V nicely. It's unbelievable ,I can not understand. Nevertheless, you may use V by starting it manually. I think that V, at this stage, is a bit unreliable yet. Please, read the beginning of this doc. on how to set the browsers paths and names. END OBSOLETE Sideffect: Exiting Yam the script leaves a directory inside T: containing the last shown document. It is not annoying to me but it is easy cure by writing a small ADOS batch to be run on leaving Yam. If you want you may e-mail me about this and for bug reports, thank you. 1.7 Note: I enclose now a little Arexx to put on "Program Termination" of the Yam arexx configuration (if you wish) .It will delete the last shown doc and the dir in T: . Law: This script is freeware and I, the author, will NOT be responsible if this script or its misuse may cause any damage whatsoever.