![]() |
Forum Index : Microcontroller and PC projects : MM Edit update V3.5.16
Author | Message | ||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6271 |
V3.5.16 This is an interim update before I start on a larger change to allow for more syntax files. The number of different 'mites is increasing so I feel it's time to allow for any number of different syntax file instead of the current 3 fixed files. The required changes might take a few weeks so I decided to offer this update with some requested changes. Printing hard copy now uses UPPERCASE keywords if that display option is set. There is a new 'Crunch' menu item under Program. This is the same as removing comments and blank lines and removing leading and trailing spaces. It will destroy all your carefully worded comments so be warned. Sick of typing "Option default none Option explicit CPU 48" every time you start a new program? You can now start new files from a template. Templates are stored in the Program Data folder and you can have up to 5 different templates. You can call them anything you like but they will have an extension of '.bt' (Basic Template) If you name one of them 'DEFAULT.BT', it will be used whenever New is chosen, not just 'New from Template' The only exception to this is when MMEdit starts up. If the option is set, it will start with a blank document. You will have to manually delete any unwanted templates. You can replace the tkn file in this ZIP 2015-06-04_073152_MMedit.zip or download the full program form the usual website http://www.c-com.com.au/MMedit.htm AS always, errors reports suggestions and requests alway welcome. Jim VK7JH MMedit |
||||
Lou![]() Senior Member ![]() Joined: 01/02/2014 Location: United StatesPosts: 229 |
TassyJim wrote: There is a new 'Crunch' menu item under Program.
This is the same as removing comments and blank lines and removing leading and trailing spaces. It will destroy all your carefully worded comments so be warned. Request, Jim, can you save this new 'Crunch' file under Save with a new name or extension and continue editing your program in the original MM Edit window and not loose the comments, spaces, etc. ?? Then every time you save the new 'Crunch' file save the updated 'Crunch' version over the old one AND save the new MM Edit file. I use the excellent MM Edit for editing my projects and Terra Term VT to load and work with the '170 files into my project because TT is fast and has a huge receive buffer I need for return info from the '170. I am out of memory on the '170 chip when loading my file with comments, so the option of easily loading a 'Crunched' file via TT would be a huge advantage to me, and maybe others. Thanks, Lou Microcontrollers - the other white meat |
||||
CircuitGizmos![]() Guru ![]() Joined: 08/09/2011 Location: United StatesPosts: 1427 |
That is exactly what I was looking for. Micromites and Maximites! - Beginning Maximite |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6271 |
As things stand, doing a 'save as' will reset the undo counter preventing what you are after. I have thought about using TeraTerm's macros to allow MMEdit to use TT as the terminal and still XMODEM the file across. That should do what you want and can look like another com port as far as MMEdit is concerned. It would also have the advantage of working with the devices that MMEdit has problems with such as the VT100 terminal. Jim VK7JH MMedit |
||||
Lou![]() Senior Member ![]() Joined: 01/02/2014 Location: United StatesPosts: 229 |
Jim wrote: As things stand, doing a 'save as' will reset the undo counter preventing what you are after.
'Save as' is what I use to save MyFile.bas as MyFile2.bas to save a new version of MyFile.bas. Maybe a better way to explain it: Is it possible to add a switch (or option) to make MM Edit automatically save a full copy of MyFile.bas AND a copy of (say,) MyFile.ba2 with comments and blank lines removed when 'save' is selected. The old files would be overwritten. Then Tera Term which is already connected to my '170 project will be able to transfer the much smaller MyFile.ba2 via xmodem directly to my '170 project. That would do exactly what I'm looking for, unless I'm overlooking something here. Thanks, Lou Microcontrollers - the other white meat |
||||
CircuitGizmos![]() Guru ![]() Joined: 08/09/2011 Location: United StatesPosts: 1427 |
Well I don't need it for TT, so my need is little different. I'd be happy if every time that MMedit is called to load directly to an MM that it first copy the compressed file to the hard drive. Something like filename.cmp. Micromites and Maximites! - Beginning Maximite |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6271 |
@Lou Saving a 'crunched' file (with a different extension) is one option. This requires the user to start XMODEM on the mite and then remember where the file has been saved to. The other way I am considering is letting MMEdit create the macro file for TT. That way it's only one button to sent the code. It will be up to the user to connect TeraTerm and then TT can stay connected and be independent of MMEdit. If needed I could do both.... Jim VK7JH MMedit |
||||
Lou![]() Senior Member ![]() Joined: 01/02/2014 Location: United StatesPosts: 229 |
Jim, My preference would be to save both the full MM Edit file AND the crunched file with a different file extension to the hard drive when 'Save' is selected in MM Edit. That way I could start XMODEM on the mite (the F11 key) and then start the XMODEM transfer in Tera Term to download the crunched file to the mite. That would be great, and maybe do what CircuitGizmos wants too. Could I bribe you with some beer money ?? Thanks, Lou Microcontrollers - the other white meat |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10254 |
Jim Yes Please!!!! The amount of time I spend opening and closing (and forgetting to close) TT before and after the download from MMEdit is huge This would be the biggest single enhancement you could make from my perspective. Thanks Peter |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6271 |
I have been playing.... Unfortunately, TeraTerm will not let me run a macro from MMEdit if TT is connected to a 'mite. Bugger... The method I have decided on (for a start) is, 'Save' creates two extra files in the data folder. lastfile.bas a normal un-chrunched copy and lastfile.baz a crunched copy. In the file menu is an option to create two macros - one for the normal and one for the crunched file. You put these macros in the TeraTerm folder so if TT is in Program Files, you might have a problem. Once created the files don't change so a bit of fighting with Windows shouldn't be a serious problem. After you have saved your creation, in TeraTerm run Control/Macro and select the macro of your choice. The macro MMEdit creates is: send #3
with the path changed to suit your PC.
pause 2 sendln "XMODEM RECEIVE" pause 3 xmodemsend "C:\Users\Owner\AppData\Local\CCom\MMedit\lastfile.bas" 1 Once created, you can change the macro as desired. I will finish a few loose ends and post the update tomorrow. Jim VK7JH MMedit |
||||
Lou![]() Senior Member ![]() Joined: 01/02/2014 Location: United StatesPosts: 229 |
Thanks Jim, That should work great. As long as MM Edit creates both files - crunched and uncrunched - I can point TT anywhere the crunched file resides to download to the mite. Once pointed there TT will go to the same place for the crunched file until it is restarted. I use a folder called 'Basic Programs' (with sub-directories) to keep all my programs but anywhere should work. That will be a great time saver when coding. Lou Microcontrollers - the other white meat |
||||
CircuitGizmos![]() Guru ![]() Joined: 08/09/2011 Location: United StatesPosts: 1427 |
That would work great! Thank you! Micromites and Maximites! - Beginning Maximite |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6271 |
Here is the update for TeraTerm users. As described above, 'Save' or 'Save As' now creates two extra files in the 'data' folder. lastfile.bas a normal un-chrunched copy and lastfile.baz a crunched copy. Both files are always created. In the file menu is an option to create two macros - one for the normal and one for the crunched file. You put these macros in the TeraTerm folder so if TT is in Program Files, you might have a problem. Once created the files don't change so a bit of fighting with Windows shouldn't be a serious problem. After you have saved your creation, in TeraTerm run Control/Macro and select the macro of your choice. The macro MMEdit creates for the uncrunched file is: send #3 pause 2 sendln "XMODEM RECEIVE" pause 3 xmodemsend "C:\Users\Owner\AppData\Local\CCom\MMedit\lastfile.bas" 1 with the path changed to suit your PC. Once created, you can change the macro as desired. The name of the two files and their location will not change. You might want to reduce the two PAUSE statements. While this is for TeraTerm, you should be able to create macros for any Terminal program to do the same thing. I have not updated my website yet. I will wait for some feedback. 2015-06-06_033003_MMedit.zip Jim VK7JH MMedit |
||||
Lou![]() Senior Member ![]() Joined: 01/02/2014 Location: United StatesPosts: 229 |
Jim Wrote: 'Save' or 'Save As' now creates two extra files in the 'data' folder.
lastfile.bas a normal un-chrunched copy and lastfile.baz a crunched copy. Both files are always created. Jim, I hate to be dense, but I'm confused about a couple things now. 1. Is the 'data' folder where my lastfile.bas I'm working on resides (I presume) or the 'data' folder under C:\Program Files (x86)\CCom\MMedit ?? 2. Does MMedit create two extra files in addition to the lastfile.bas I'm working on (maybe in the C:\Program Files (x86)\CCom\MMedit\data directory) or does it create just one extra file called lastfile.baz and save a new copy of lastfile.bas in my current working directory (preferable) ?? I have not updated my website yet. I will wait for some feedback.
2015-06-06_033003_MMedit.zip I just downloaded and am running v3.5.16 and don't see any extra files created when I 'save' or 'save as' so I assume I'm running the version before the (two) extra files are created. Also downloading the 2015-06-06 033003 MMedit.zip creates a file called MMedit.TKN, I have no idea what that is. So, if you're asking for feedback about creating the (two) extra files I say go for it. I hope I didn't make a mess of things here - you can beat me with a cane later if I did (but just till I start liking it). Thanks for all your efforts, Lou Microcontrollers - the other white meat |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6271 |
@Lou The MMEdit.tkn file in the ZIP needs to replace the TKN file in MMEdit's program folder. This will update MMEdit from V3.5.16 to V3.5.17 The two new files created when you do a save will always be called lastfile.bas and lastfile.baz. They will be in the folder that contains the syntax files etc. Where that folder is will depend on your version of Windows. It is the Data Folder shown in Help/About. Your normal file is saved as before into its original folder. In my Windows 7 the new files are: C:\Users\Owner\AppData\Local\CCom\MMedit\lastfile.bas C:\Users\Owner\AppData\Local\CCom\MMedit\lastfile.baz Yours would be similar with 'owner' changed to 'Lou' or 'fred' etc When you create the TeraTerm macros the correct path is created for you. Just place the macros into the TeraTerm program folder. If Windows stops you from doing that, save then somewhere that you are able to save to then copy them to the program folder using Windows Explorer. Hope that helps. Jim VK7JH MMedit |
||||
Lou![]() Senior Member ![]() Joined: 01/02/2014 Location: United StatesPosts: 229 |
Thanks Jim, I moved the .TKN file, now I have V3.5.17 I finally found the lastfile.baz in the Windows7 tree, pointed TT there for the File/Transfer/XMODEM/Send/ and it works !!! Now I have 20k more room in the Mite. The only thing that could be better is to put a copy of lastfile.baz in the same directory where my original .bas working file resides. I went to Control/Macro in TT, can't figure that out but it works fine from TT's File/Transfer/XMODEM. THANKS, without you spelling it out like you did I would have never figured it out. Lou Microcontrollers - the other white meat |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6271 |
Glad you have it working Lou. I didn't use the current working folder for the .baz file because that would have made it difficult for those users who use TeraTerms macros to do the upload. I find it much quicker to use the macro rather than having to navigate to the file each time. Did you try creating the macros? In MMEdit File/Make TeraTerm macros. Jim VK7JH MMedit |
||||
Lou![]() Senior Member ![]() Joined: 01/02/2014 Location: United StatesPosts: 229 |
Jim, I just created the Macros, I named the first one Bas Macro, the second one Baz Macro and moved them into the teraterm subdirectory under Program Files (x86). Works great, that is slick - perfect !! Great work JIm !! Thanks, Lou Microcontrollers - the other white meat |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |