Short: OpenURL Preferences Editor Author: sisk637 cyberonic com (Robert A. Sisk) Uploader: sisk637 cyberonic com Type: comm/www Version: 1.4 Replaces: comm/www/OpenURLPrefs.lha Requires: util/libs/mui38usr.lha util/rexx/rxmui.lha util/rexx/royalbridge11.lha comm/www/openurl.lha Architecture: generic This program is an alternative preferences editor for OpenURL. It is a MUI application written in ARexx, developed on an A4000/040 with AmigaOS 3.9 + BoingBags 1 & 2, MUI 3.8, RxMUI 42.6, RoyalBridge 1.1, and OpenURL 7.0. It differs from the original editor in that client data are edited in the main window rather than separate edit windows. Unlike the original, but like the standard editors, it supports the usual startup options, and has Open, Save As, and Create Icons menu items. In addition, it has pop-up edit menus for the client listviews and the general options gadgets, it disables the edit menu items when they have nothing to do, and the window is an AppWindow which will load a dropped preferences file. The Create Icons setting is automatically saved and loaded separately from the OpenURL settings when the program quits and starts. When you edit the strings, inserting a path or placeholder using the pop-ups enters the value into the list, but after typing or pasting, the value is entered only when you press return. The string gadgets use the Textinput MUI custom class, which supports drag-marking. The pop-up selection replaces the marked portion of the value or inserts at the last accessed position. This program disallows control characters in the string gadgets. The original editor also rejects typed control characters, so it is presumably unintentional that it accepts them when they are pasted in. I use an icon datatype class, util/dtype/IconDT44.lha, so several About windows look a bit prettier. The links in the About requesters use OpenURL. To make the About address link work, in OpenURL preferences I edited my mailer command's address argument so the keyword is joined to its value by a space instead of an equals sign. The equals sign apparently exposes a bug in dos.library/Execute() that assumes an angle bracket indicates a stream redirection. This program is a demonstration of the power of ARexx and RoyalBridge to access arbitrary libraries (in this case openurl.library). By releasing this script, I hope to encourage more development in ARexx. When saving a preferences file, if Create Icons is checked and the icon file doesn't already exist, the program will copy the file Env:Sys/def_prefs.info or the system will provide a default project icon: Env:Sys/def_project.info or an internal image. The new icon will have a Cmd tool type which specifies the preferences file and also a copy of the program's Console tool type. However, if the program's absolute path contains a space, the tool types won't be written. If the program receives options from the command line or from the Cmd tool type, it processes them with the following argument template. Otherwise, it reads its options as tool types with the same keywords. From,Edit/S,Use/S,Save/S,PubScreen/K PubScreen overrides the corresponding setting in MUI preferences. Known Problem When the mouse pointer is over a gadget that has a context menu, a menu item keyboard shortcut has the right-Amiga key stripped from it. For example, with the mouse over a listview, the shortcut for Edit > Reset to Defaults presses the Down button instead, and the Project > Quit shortcut does nothing. I'm told this problem is gone in MUI 3.9. History 1.4 Fixed bug: Last fix was broken. 1.3 Fixed bug: Mishandled 32-bit memory address values. 1.2 Fixed bug: Inserting Start path from file requester failed to update disabled states of window and pop-up edit menu items. 1.1 Fixed bug: If Save or Use button failed, program would quit anyway. 1.0 First Aminet release. I welcome your comments and questions.