... Trouble viewing this in HTML? See it online at http://www.multieditsoftware.com/TheDev/v02_i06_2005.htm

 

str Gurus( str Msg ) { Make_Message( Msg ); } void Calling { str Respose = Gurus( "Help" ); }

 


 September 2005 Topic Links
 


Welcome to the Multi Edit Software Newsletter...

This issue is all about the CMac.

- Chad W. Williams

Welcome to the Macro Packed issue of the Developer News! In this issue we'll focus on the Multi-Edit CMac language, usage examples, and CMac coding tips as well as the exciting kick off of our "Submit Your Code" CMac contest.

Carl Hall has provided a detailed example of a small but powerful and time saving macro. In his example you'll see how powerful CMac macros truly are. You'll find that Multi-Edit Macros not only save time but will also dramatically increase productivity.

Dan Hughes' article also displays usage of Multi-Edit's CMac language, just a tad more complex than today's tech support article. In Dan's examples you'll see how easy it is to create fully functional macros as well as information on how to create a complete add-on package that ties into Multi-Edit with ease.

For those of you who are already familiar with programming in CMac but are on the lookout for increasing your repertoire, purchase your copy of the CMac today and increase your development power by utlitizing the complete documentation for Multi-Edit's CMac language. The CMac Users Guide in its electronic format, is now available for purchase from our online shopping cart for only $20.00.

As usual, I've saved the best announcement for last! The Multi Edit Software, Inc. CMac Contest "Submit Your Code" has now officially kicked off and we're happy to announce that we'll be accepting your submissions through December 21st! The Submit Your Code Contest is a great chance to show off your programming skills and enter to win a great prize while getting a bit of global publicity for your handiwork. Recognition will be noted to all selected winners within the source code as well as the website, newsletter etc. upon the completion of the contest.

Remember, our Multi-Edit support forums can be a huge resource for Multi-Edit and CMac related questions, post your question today on our support topic at http://www.multieditsoftware.com/forums/viewforum.php?f=3 to receive support from the MESI staff, developers and Multi-Edit's power users. Also consider taking a look at the user submitted macros topic at http://www.multieditsoftware.com/forums/viewforum.php?f=9 these user submitted macros will not only assist with examples and ideas on where to start with your CMac contest entry, but may also perform a task you've been looking for all along.

The permanent address of the CMac Contest "Submit Your Code" rules and regulations is located at: http://www.multieditsoftware.com/CMacContest.htm. and they are also listed in this newsletter below. Use the topic links to pull it up quickly.


Chad Williams, CEO
Multi Edit Software, Inc.
Chad Williams: chadw@multieditsoftware.com

**Please note that you can review/search through all forum topics, but to submit a post you must create a login identity.

 

 

Meet the deadline, enjoy more tee time using Multi-Edit

with our Multi-Edit Summer Discount

MESI continues our summer discount, for both New Users and Upgrade purchases of Multi-Edit v9.10

To purchase, input the coupon codes below at the bottom of our Online Order Form.
Use the hyperlink above to access the store, or 'paste' the following text link into your browser: https://www.multieditsoftware.com/meorder

Save $15.00 on our download versions
with this code: 0405MEdtx02

Multi-Edit v9.10 New User Download = $184.00
(normally $199.00)
Multi-Edit v9.10 Upgrade Download = $84.00
(normally $99.00)

Save $25.00 on our Full Media
(Manual and CD)
with this code: 0405MEstx01

Multi-Edit v9.10 New User (full media) = $224.00
(normally $249.00)
Multi-Edit v9.10 Upgrade Purchase (full media) = $124.00
(normally $149.00)

Your discounted price will be validated once
all your shipping and billing information has been entered.

Click here to view some more information regarding Multi-Edit

Visit our secure Online Ordering Form:
https://www.multieditsoftware.com/meorder

Or send an email to:
The MESI Sales Desk: sales@multieditsoftware.com

Or call us toll free:
1-877-910-2700 x1 for Customer Service!

 


Updates from the VP

CMac Zips from the VP

- L. Dan Hughes

As you can see the theme of this newsletter is about our "CMac Contest" and with that in mind I felt that a couple macro examples worthy of the professional programmer were in order. I have placed these examples on our website for you to retrieve, that will provide an outline for what you can do with the CMac Language.

You may use these examples as the starting point for your own projects.

The first sample I will discuss is some of the code that we use internally for all of our IDE integration packages. The code is written to be compiled with Delphi 6 but could be ported over to another language without too much trouble. This code can be downloaded from our website at:
http://multiedit.com/downloads/windows/tools/MeComObj910.zip

Unzip this file into a working directory and load the MeComTest.dpr file into Delphi 6 and compile it. This little program will allow you to connect to Multi-Edit and will cause it to run macros and get/set Multi-Edit global variables. In the Multi-Edit Src directory there is a macro file called Remote.s which contains a number of macros which are used to load and save files via the COM interface and are the macros used by the Borland and Microsoft IDE integration packages. The MesiUnits\MeComObj.pas file contains the code that actually communicates with Multi-Edit via its COM server.

The second example I'll discuss, will be code that implements a macro that performs bulk search and replacements. The macro reads a file with groups of search and replace strings, to determine what to find and replace. It also is a simple example of how to create a Multi-Edit AddOn. The file can be downloaded from:
http://multiedit.com/downloads/windows/macros/BulkReplaceSrc.zip
Once you unzip this file into a working directory, bring up the Multi-Edit help file and read the section under Modifying Multi-Edit Setup | Update Script Reference | Add-On Packages Installation Files. This will give you an overview of what each of the files in the main directory are used for and what they contain.

The Update Script Reference section of the help file will also be useful for understanding the BulkReplace.upd file in the main directory. The files in the main working directory are common to all AddOn packages and are used by the Tools | Install Add-On Packages menu entry of Multi-Edit to install the AddOn into Multi-Edit. The layout of the working directory is similar in appearance to the Multi-Edit directory when it is installed, except, it will be located in the AddOns directory of Multi-Edit.

The main macro source is located in the Src\BulkReplace.s and the compiled macro is in Mac\BulkReplace.mac. A document to describe the AddOn is located in Doc\BulkReplace.txt and is shown when the AddOn is installed into Multi-Edit.

Once an AddOn is created there needs to be an easy way of distributing it to others and this is most easily done by creating an installer program. In the Sources\Build directory there is the BulkReplace.nsi file that is a script for the Nullsoft Scriptable Installation System (NSIS) program. It is a very powerful free installer program and can be downloaded from http://nsis.sourceforge.net/

My third and last hint of the day, is a utility that comes from the archive. The trace facility, which is mostly implemented in the system macro files TDbg.s and TDbg.sh, allows your macro to send debugging information to any of three locations as it runs. You can read all about here:
http://www.multieditsoftware.com/trace_facility.php

I hope this little overview of some sample code will get you thinking about what you can do with Multi-Edit & CMac and that possibly, it just might help you win one of the great prizes we're distributing.

Until the next Newsletter...
Happy Coding!

L. Dan Hughes, VP/CTO
Multi Edit Software, Inc.
danh@multieditsoftware.com

Input Your Suggestions in the Forum:
http://www.multiedit.com/forums/viewforum.php?f=7

 

**Please note that you can review/search through all forum topics, but to submit a post you must create a login identity.

 

str Gurus( str Msg ) { Make_Message( Msg ); } void Calling { str Respose = Gurus( "Help" ); }

( calling all Macro Gurus for help )
enter the contest below!

 



------------------------------Today's Highlight----------------------------


Submit Your Code Contest

these rules are permanently on display here: http://www.multieditsoftware.com/CMacContest.htm

You can begin referencing our CMac articles here: http://www.multieditsoftware.com/techart.htm

And don't forget to read both our VP's and Support Tech's articles in this Newsletter!

Updates from the VP
and
From the Support Desk

 


The CMac "Submit Your Code" Contest Details:

To participate in the "Submit Your Code contest," you must be at least 18 years old and a registered user of Multi-Edit. The contest is open to individuals with a valid Multi-Edit license. Code submissions may be included in future Multi-Edit releases and will note full recognition to the author of the code.

Entries will be accepted from September 14th, 2005 through December 21st 2005 and winners will be announced and prizes awarded on January 18th, 2006.

Entries can be as minor as enhanced language support, new or enhanced dialogs, new functionality or even complete add-on packages such as EZRTools, PL/SQL or Evolve. Possibilities are endless and limited only by your creativity! Enter today and have your code displayed in a commercial product that's used around the world by government agencies, military, educational institutions and most of the Fortune 500 companies. Get the exposure you deserve for your development skills, submit your entry today and gain something to brag about for years to come!

Eligibility, Rules and Regulations:

In order to be valid, each entry will require contestants provide complete "Registration Requirements" (noted below) and have a valid Multi-Edit serial number (any prior release accepted). You may also choose to write your code in any language, granted the code is easily integrated into ME v9.10 and contains at least some usage of the Multi-Edit CMac language. Your submission must include Source Code and a README file which explains the functionality of your submission. If your code depends on third-party packages, you must include a complete list of all packages, including exact version information and download URLs. Sorry, we cannot accept entries that require commercial software or other software that is not provided as open source or under GPL unless the code's purpose is to interface Multi-Edit with the other software package(s).

Registration Requirements:

  • Company Name:

  • Contact Name:

  • Address 1:

  • Address 2:

  • City/State/Zip:

  • Multi-Edit License Number:

  • Phone Number:

With regard to an entry you submit as part of the Contest, you grant Multi Edit Software, Inc. a worldwide, perpetual, fully paid-up, non-exclusive license to make, sell, or use the technology related thereto, including but not limited to the software, algorithms, techniques, concepts, etc., associated with the entry.

If you are selected as a contest winner, you agree that Multi Edit Software, Inc. may publicize your name, likeness, and the description of work you did to win the contest. Apart from the prizes associated with being selected as a winner, Multi-Edit Software, Inc. shall not be obligated to compensate you in any way for such publicity.

Entries from outside the U.S. are permitted. All entries must include an English-language explanation of the design. Entries must also include complete source code for the implementation.

Entries must be submitted in machine-readable format (zipped file) via e-mail to contest@multieditsoftware.com with a subject line of "Submit Your Code Entry".

You may submit multiple entries. Keep copies for your records. Multi Edit Software, Inc. assumes no responsibility for lost, misdirected, illegible or late entries or for failed computer transmissions or technical failures.

Each entrant shall indemnify, defend, and hold Multi Edit Software, Inc. harmless from any third party claims, including attorneys' fees and costs, arising from or related to that entrant's participation in the Contest. In no event shall Multi Edit Software, Inc. be liable to an entrant for acts or omissions arising out of or related to the Contest or that entrant's participation in the Contest.

Submission of a valid entry commits the entrant to the following:

1. I release to Multi Edit Software, Inc. any and all copyright interest in the code and/or software and any changes or enhancements to Multi Edit Software, Inc. software that I may have derived. I declare this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to Multi Edit Software, Inc. software and code revisions created by me under copyright law.

2. To the best of my knowledge and belief, the changes and enhancements that I have contributed to Multi Edit Software, Inc. software are either originally written by me or are derived from prior works which I have verified are also in the public domain and are not subject to claims of copyright by other parties.

Prizes:

1st Prize:   19" LCD Monitor - ONE Winner

2nd Prize:   Cordless Keyboard & Mouse Set - TWO Winners

3rd Prize:   One of the following - TEN Winners

4th Prize:   $10.00 Amazon Gift Certificate - FIVE Winners

Entry Prize:   Upgrade discount to Multi-Edit 10 - All valid entries

Prizes will be awarded based on MESI's evaluation of the submitted code and will be judged on creativity, ease of use, usefulness of code and overall originality. Odds of winning depend on the number and quality of entries received. All taxes, including income taxes, are the sole responsibility of winners. No prize substitution is permitted. Winner(s) may be required to verify their entry. All submissions that meet eligibility requirements will receive a voucher coupon valid for $10.00 off Multi-Edit upgrade to the upcoming version 10 release scheduled for the Spring of 2006.

Judging:

Winners will be selected by the Multi Edit Software, Inc. development staff. The judges will grade entries using the following criteria:

  • General utility and importance of output

  • Scalability and elegance of design (including selection of appropriate algorithms and data structures)

  • Clarity, efficiency and portability of implementation

The Multi Edit Software, Inc. judges shall have the sole authority and discretion to select the award recipient(s).

Notification:

The winning entries will be announced on the MultiEdit.com site by Multi Edit Software, Inc. on Jan 18th, 2006. Following the announcement, individual winners will be notified by e-mail. Winners have 14 days from notification to claim the prize. Prizes may be claimed by return e-mail. Unclaimed prizes will not be awarded. Prize winners will be able to choose from the winning prize or the cash value of the prize awarded. Cash value will be based on current retail prices at the time prizes are awarded. Due to import/export laws, International contestants may receive cash value for prizes awarded.

Eligibility Exclusions:

Multi Edit Software, Inc. employees, former employees/contractors, immediate families are not eligible to enter. Only complete and valid registrants will be considered and selected for prizes. Void where prohibited.
------------------------------Today's Highlight----------------------------

 


From the Support Desk

Let's take a good look @ a Macro

- Carl Hall

Seeing as how we're promoting the CMac "Submit Your Code" contest this month I thought I'd bring out a CMac file for review and a brief explanation for the masses. This particular file is called FindDup.s and its purpose is going through files, locating duplicate entries and removing them line by line. Very handy when dealing with files that you've merged and may have multiple instances of the same line, or files such as dictionary files or email lists with potential duplicate entries that need to be removed. Why go through line after line of code, burning out your eyes, when you can locate and remove all duplicate instances within a matter of seconds? The FindDup.s macro is a great example of what CMac can do with very little programming effort and how powerful even the simplest of macros such as FindDup can be.

Lets start with the actual source code for our FindDup macro. You can either copy and paste the source below into a new File within Multi-Edit or you can download the completed source 'FindDup.s' by clicking:
http://www.multieditsoftware.com/forums/viewtopic.php?p=4247.

void FindDup( )
/**********************************************************
                               Multi-Edit Macro
                               10-Oct-02  13:37

  Function: `description`
  Entry   : `entry`
  Exit    : `exit`
  Author  : Dan Hughes

Copyright (C) 2002 by Multi-Edit Software, Inc
**************************************************(ldh )***/
{
  str Line1[ max_Line_Length ];
	str Line2[ max_Line_Length ];
//   More information on max_Line_Length
//   on page 214 of the CMac Users Guide
  int SRefresh = Refresh;
  int Count;
//  More information on Refresh
//  on page 110 of the CMac Users Guide

  Refresh = false;
  Count = 0;
  Line1 = Get_Line( );
//  More information on Get_Line 
//  on page 221 of the CMac Users Guide
	while ( !At_Eof ) {
    Goto_Col( 1 );
//  More information on Goto_Col
//  on page 117 of the CMac Users Guide
	  Down;
    if ( At_Eof( ) ) {
      Make_Message( "No Duplicates" );
      break;
//  More information on Make_Message
//  on page 204 of the CMac Users Guide
    }
    Line2 = Get_Line( );
// DebugLog( 0, "FindDup", "1=%s 2=%s", Line1, Line2 );
// 1
// 1
    if ( Line1 == Line2 ) {
      ++Count;
// DebugLog( 0, "FindDup", "Duplicate Line=%s", Line2 );
      Up;
      Del_Line;
// More information on Del_Line
//  on page 220 of the CMac Users Guide
//      Make_Message( "Duplicate Line" );
//      break;
      }
      Line1 = Line2;
    }
    if ( Count ) {
      Make_Message( "Found " + Str( Count ) + " duplicates." );
    }
    Refresh = SRefresh;

}
// FindDup

If you've chosen to copy the above source into a new file within Multi-Edit, you'll need to save the file using filename FindDup.s before continuing.

Once your source code has been created and saved, or opened from the above link, you will need to compile it in order to be able to create and run the .mac file from within Multi-Edit. Steps for compiling Multi-Edit macro source can be found at:
http://www.multieditsoftware.com/forums/viewtopic.php?t=1056

Now that you've compiled your macro, you're going to want to test it out on a file. I have conveniently provided you with a sample.txt "dictionary" file which contains a number of duplicate entries. You can download this sample.txt file by right clicking | Save Target As:
http://www.multieditsoftware.com/sample.txt

You now have your source code compiled, a .mac file has been created, and you've obtained our sample.txt file to work with. Now, open the sample.txt file and select from the Multi-Edit menu, Macro | Run. The Run Macro dialog will now appear for you to enter the macro name you wish to run, in this case, FindDup. The macro name will be case sensitive and will need to be entered exactly as defined in the first line of code within the macro "void FindDup( )". Type in FindDup, and click okay to run the macro. The macro is so quick that you may not notice that it has already removed 5 duplicate entries from the sample.txt file. The status of the macro run is displayed in the status bar in the lower left of the Multi-Edit window and will note "Found 5 Duplicates".

You may have noticed that there are numerous comments which point to the CMac Users Guide for more information within the FindDup macro. I intentionally did this to show that all the code functions used in this simplest of macros is documented in full detail and in most cases provides real world examples of usage within the CMac Users Guide. I cannot stress to you enough, both to experienced users and beginners how useful and valuable the CMac Users Guide is to those who intend to use or are already using CMac to improve their coding quality and speed! Be sure that you purchase your copy of the "CMac Users Guide" today at our online order form at:
https://www.multieditsoftware.com/meorder

Folks, that's all there is to it! Be creative, consider your overall intention for creating your macro, code it, compile it and you're done and ready to run!

Thank you, and as always I'm,
Carl Hall

As always, any suggestions for a future tech article are always welcome at my email address: Carl Hall: carlh@multieditsoftware.com

 




Programmers Paradise

Programmer’s Paradise is a reseller of select, quality computing products and services to software developers and other IT professionals. The company operates in the United States and Canada, marketing technical software for microcomputers, servers and networks. Through its wholly owned subsidiary, Lifeboat Distribution Inc., it distributes products to dealers and resellers in the United States and Canada. Programmer's Paradise specializes in offering a particularly wide selection of programming languages, tools, utilities, libraries, development systems, interfaces and communication products.

Jeff Largiader
Vice President - Sales & Marketing
Programmer's Paradise, Inc.
1157 Shrewsbury Ave.
Shrewsbury, New Jersey 07702-4321
Telephone: (732) 389-8950 extension 7393
Fax: (732) 460-9317

website: www.programmersparadise.com
e-mail: jeff.largiader@programmers.com



AxonWare is a privately held corporation located in Dublin, Ireland. It provides business and developer tools across Europe. The promoters of AxonWare have been supplying Multi-Edit since 1995 and are committed to world class service to the Multi-Edit community. Visit them at Axonware.com or call them to discuss network licensing options.


Website: Axonware
Tel: +353-1-4958914
Fax: +353-1-6335746
Email: Julie Nyhan: JulieN@axonware.com

..

 


..

If your e-mail application has trouble viewing this in HTML format, you can also view it online at http://www.multieditsoftware.com/TheDev/v02_i06_2005.htm


Copyright © 2005 Multi Edit Software, Inc. All rights reserved.

Multi-Edit, the Multi-Edit "packaging"and logo,
are trademarks of Multi Edit Software, Inc.

SAS is a registered trademark of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.
All other brands and products are trademarks of their respective holder(s).

Multi Edit Software, Inc. 3370 N. Hayden Rd. #123 PMB 712 Scottsdale, Arizona 85251

.