@database Editor_Enhancer.guide @author "Paul Hickman" @node main "AMOSPro Editor Enhancer V1.01 - By Paul Hickman" @toc Easylife.guide/main @{b}@{u}AMOSPro Editor Enhancer V1.01 - By Paul Hickman@{uu}@{ub} @{b}@{u}E-Mail: ph@doc.ic.ac.uk@{uu}@{ub} @{"Introduction " link Introduction} @{"Requirements " link Requirements} @{"Installation " link Installation} @{"Program History " link History} @{"Misc. Notes " link Notes} @{"Contacting The Author " link Author} @{"Easylife Docmumentation" link Easylife.guide/main} This program adds four very simple, but very useful utilities, to the AMOSPro editor's user menu. They are: @{"Get Scancode " link SCANCODE} @{"Get AscII " link ASCII} @{"Get File " link FILE} @{"Unflip Bobs " link UNFLIP} Also, it replaces all the AMOSPro Search & Replace menu option with new improved versions: @{"Search " link FIND} @{"Search Next " link FINDNEXT} @{"Search Previous " link FINDPREV} @{"Replace " link REPLACE} @{"Replace Next " link REPLACENEXT} @{"Replace Previous " link REPLACEPREV} @endnode @node Introduction "Editor Enhancer / Introduction" @{b}@{u}AMOSPro Editor Enhancer V1.01 - By Paul Hickman@{uu}@{ub} The Editor Enhancer started life as 2 little accessories, one to unflip bobs for the bob editor, and one to get AscII & Scancodes from keypresses. Then I tried to use the AMOSPro editors search and replace feature for the first time, and thought to myself @{b}AAARRRRGGGGGHHHH!!!!!!!!!@{ub}. Hence the editor enhancer was born. Now you can have a search and replace that is actually *useful* E.g. Now when you select replace next, it does a replace then a search, not a search then a replace, so you can actually see the occurance that is to be replaced before it is too late. You can also now select which parts of the program to search. @endnode @node Requirements "Editor Enhancer / Requirements" @{b}@{u}Requirements@{uu}@{ub} The only requirements for the editor enhancer are that you have AMOSPro, with Easylife V1.07+ installed. @endnode @node Installation "Editor Enhancer / Installation" @{b}@{u}Installation@{uu}@{ub} @{u}Upgrading V1.0 to V1.01@{uu} If you have V1.00 installed, simply copy the V1.01 Editor_Enhancer.AMOS file over your old version and you are done. Otherwise, don't let this put you of but... Unfortunately, there is a lot to do. You install each of the 4 user menu utilities seperately - If you really don't want any of them, you can skip adding them to the user menu, or if you are a masochist, you can not change the search functions, but if you install 1 part of the program, you might as well to the rest - it won't take any more memory (Well OK, a few bytes for the strings you enter) NOTE: Either install all search menu functions, or none of them. If you install just some of them, it won't work properly. 1) If you haven't run the easylife installer script, make sure that the Editor_Enhancer. AMOS file in it's permanent location. For harddisk users, this would normally be "AMOSPro_Accesories:". For floppy disk users, it should be in "Easylife2:Accessories/". 2) Load the AMOSPro editor. 3) Select 'Add Option' on the user menu, and type 'Get Scancode' into the requester, and press OK. 4) Select the 'Get Scancode' option which has now appeared on the user menu when asked which menu option to assign a program to, then select the Editor_Enhancer.AMOS program. 5) In the next requester, set the options as below, then press OK: - Run as hidden program - Keep after running (Important that this is on) - Command line = 'SCANCODE' (Without the quotes) 6) If you want a keyboard shortcut, select the 'Get Scancode' menu option again, then press the keyboard shortcut. If you chose not to add a shortcut, don't worry, you can do so later on with the 'Set key Shortcut' option in the config menu. 7) Repeat steps 3-6 to add three more options, 'Get AscII', 'Get Filename', and 'Unflip Images', setting the command line to 'ASCII', 'FILE' and 'UNFLIP' in each case. 8) Select 'Set Program To Menu' from the config menu, the choose the 'Search New' from the search menu. Select the Editor_Enhancer.AMOS in the file selector. In the next requester, set the options to: - Run as hidden program - Keep after running (Important that this is on) - Command line = 'FIND' 9) Repeat step 8 five more times, selecting each search menu item in turn, and setting the command lines to 'FIND NEXT', 'FIND PREVIOUS', 'REPLACE', 'REPLACE NEXT', 'REPLACE PREVIOUS'. 10) Select 'Save Default Config' from the Config menu to make the changes you have made to the menus permanent. Alternatively, you may save to a different configuration file with 'Save Config'. If you chose the later, you must reload this configuration with 'Load Config' every time you use AMOS Pro. Try the program before saving the configuration - if you are seriously deranged, and don't like it, don't save the configuration, then call a shrink to help you work through your problem (Or if you are a shrink, find a mirror, and don't get offended at the term 'shrink' - I'm to crap at spelling to even contemplate thinking about the spelling of the P word). Phew. @endnode @node History "Editor Enhancer / Program History" @{b}Program History@{ub}@{u}@{uu} @{u}Changes V1.00 ---> V1.01@{uu} - After inserting a AscII Code / Scancode / Filename, the cursor is automatically moved to the end of the inserted text. - BUG FIX: When searching for something that is found at the same X cursor position as the current X cursor position, the cursor was moved right one space. - When a search string is not found, a 'Not Found' message appears, and the cursor is not moved to the end of the program anymore. - Which options were checkmarked in the search/replace requester is remembered for the next time it is brought up. - Unfold procedures option added. - HUGE bug fixed in the global replace - it didn't find more than one occurance on the same line (err... Oops :-) - If you are not in the middle of a search/replace the Next/Previous menu options will bring up the search/replace requester. @endnode @node Notes "Editor Enhancer / Notes On Usage" @{u}@{b}Miscellanous Notes@{ub}@{uu} @{u}Cavat@{uu} You can't use any of the menu functions assigned to this program if it is in an open edit window. Hide it if you have this problem. This does mean it is impossible to use search / replace on this program's source code! @{u}De-Installation@{uu} You want to remove my wonderful program ??????????????????? Well, if you just want the memory back after using it, select it on the accessories menu, and 'New' it. If you want to remove a user menu option permanently, select 'Delete Option' from the user menu, then the option to delete. If you want the get the original search / replace functions back, select 'Set Program To Menu' from the config menu, and press erase in the requester that appears. Remember to save the editor configuration after making any changes. @endnode @node Author "Editor Enhancer / Distribution " @{u}@{b}Distriubtion Conditions@{ub}@{uu} @{u}Development@{uu} Send ideas for more features / bug reports to me (Paul Hickman) via e-mail (ph@doc.ic.ac.uk). Also if you modify the program, please send me back the changed copy for redistribution. I actively encourage you to add features to this program - it should be obvious how to do so - just put an extra 'If' block in the main program. Use 'Reserve As Data' to store permanent variables between runnings of the program. Insert code to reset these to the default values in the error routine for when the program is run directly. @{u}Legal Stuff@{uu} This program may be freely distributed in its original form as long as no profit is made from doing so, either directly, or indirecty. The distribution must contain this documentation with the program. Modified versions may also be distributed under the same conditions, but the fact that I am the original author must not be removed from the program, or documentation. @endnode @node SCANCODE "Editor Enhancer / Get Scancode" @{u}@{b}Get Scancode@{ub}@{uu} The 'Get Scancode' user menu option pops up a requester asking you to press key. When you do so, the scancode of the key you press is inserted into the current program, at the cursor position, and the cursor moved to the end of the inserted number. @endnode @node ASCII "Editor Enhancer / Get AscII" @{b}@{u}Get AscII Code@{uu}@{ub} The 'Get AscII' user menu option pops up a requester asking you to press key. When you do so, the AscII code of the key you press is inserted into the current program, at the cursor position, and the cursor moved to the end of the inserted number. @endnode @node FILE "Editor Enhancer / Get File" @{b}@{u}Get Filename@{uu}@{ub} The 'Get File' user menu option pops up a file selector. If you select a file, the full pathname is inserted into the current program, in double quotes.It is inserted at the cursor position, and the cursor is moved to the end of the inserted string. If you exit the file selector without choosing a file, nothing is inserted. @endnode @node UNFLIP "Editor Enhancer / Unflip Bobs" @{b}@{u}Unflip Images@{uu}@{ub} If you use automaticaly horizontal or vertial Bob/Sprite/Icon flipping in your program, then select the "Edit Objects" user menu item to run the object editor, you will find that some of your bank's images are in their flipped state, and some are not. Selecting the 'Unflip Bobs' user menu option first will return every image in the sprite & icon bank to its unflipped state. @endnode @node FIND "Editor Enhancer / Search..." @{b} @{u}Search...@{uu}@{ub} When you select this option, the Improved Search requester appears. Along with a gadget to enter the search string, it has the following controls: [F1] Backwards When checkmarked, the initial search is backwards from the current cursor position. Otherwise it is forwards. [F2] Case Sensitive When checkmarked, the search is case sensitive to alphabetical characters. Otherwise the case of letters is ignored when they are checked against the search string. [F3] From Begining The search begins from the top of the program when this is checkmarked. Otherwise it is from the cursor position. [F4] Unfold Procedures When checkmarked, all procedures that can be unfolded will be unfolded before the search begins. You can also choose which parts of your code will be searched for the string, limiting by context: [F6] Search Strings Occurances within strings are only found / replaced if this option is checkmarked. [F7] Search Comments Occurances within comments are only found / replaced if this option is checkmarked. [F8] Search Code Occurances outside comments & strings are only found / replaced if this option is checkmarked. NOTE: If you search string contains a quote character (Either single or double), you should turn all three options on to find the string correctly, otherwise occurances may be missed. When you press OK (or Return twice), the string is searched for. NOTE: If the search string is empty when you press OK, the search is cancelled. You can also cancel by pressing escape. @endnode @node FINDNEXT "Editor Enhancer / Search Next" @{b}@{u}Search Next@{uu}@{ub} If you have not begun a search, or the previous search has ended with a 'Search String Not Found' message, this option will bring up the @{"search" link FIND} requester. Otherwise, it will find the next occurance of the current search string, subject to the conditions of the search. @endnode @node FINDPREV "Editor Enhancer / Search Previous" @{b}@{u}Search Previous@{uu}@{ub} If you have not begun a search, or the previous search has ended with a 'Search String Not Found' message, this option will bring up the @{"search" link FIND} requester. Otherwise, it will find the previous occurance of the current search string, subject to the conditions of the search. @endnode @node REPLACE "Editor Enhancer / Replace..." @{b}@{u}Replace...@{uu}@{ub} The replace reqeuster feature all features of the @{"search" link FIND} requester, and everything said about it also applies to the replace requester. In addtion, there is another string gadget to enter the replace string, and 2 more options: [F9] Replace All Occurnces In Marked Block All occurances in the current marked block will be replaced with the replace string, subject to the search string occuring in a part of the text for which searching is enabled with the F6 - F8 keys. [F10] Replace All Occurances A Global replace is performed, replaceing all occurances of the search string that occur in a part of the text for which searching is enabled. All global replaces begin at the top of the file. It is recommended that you also unfold all procedures [F4]. If Either of these two replace options is selected, then all the relevant occurances of the search string are replaced immediately. Otherwise, the first occurance of the search string (Using F1 & F3 settings) is found. You may then you Replace Next / Replace Previous to replace it, or Search Next / Search Previous to skip this occurance, and find the next. NOTE: As with the search requester, if the search string is empty when you exit the requester, the search & replace operaion is always canceled. However, if the replace string is empty, it is not canceled, but becomes a "search & delete". @endnode @node REPLACENEXT "Editor Enhancer / Replace Next" @{b}@{u}Replace Next@{uu}@{ub} If you have not begun a search & replace, or the previous search & replace has ended with a 'Search String Not Found' message, this option will bring up the @{"Replace" link REPLACE} requester. Otherwise, if there the cursor is still over the last occurance of the search string that was found, it will be replaced. Then it will find the next occurance of the current search string, subject to the conditions of the search. @endnode @node REPLACEPREV "Editor Enhancer / Replace Previous" @{b}@{u}Replace Previous@{uu}@{ub} If you have not begun a search & replace, or the previous search & replace has ended with a 'Search String Not Found' message, this option will bring up the @{"Replace" link REPLACE} requester. Otherwise, if there the cursor is still over the last occurance of the search string that was found, it will be replaced. Then it will find the previous occurance of the current search string, subject to the conditions of the search. @endnode