INSIGHT SOFTWARE SOLUTIONS
OTHER AUTOMATION TOOLS
ABOUT US 

 

 

November 2, 2010

This is the online edition of the Macro Express News email newsletter. You can have future editions delivered directly to your email inbox. Visit the Macro Express News page to subscribe or to view past issues.


Macro Express v 4.2.1.1 ME Pro

Macro Express Pro v 4.2.1.1 is now available from www.macros.com/download.htm. This release of Macro Express Pro contains several enhancements and bug fixes including:
  • Added the ability to paste rich text using the Text Type command.
  • Added a 'Run macro without testing' button to the script editor.
  • Added a new method for using controls. Controls can now be located using their on-screen coordinates.
  • Added an option to not parse embedded variables in the 'Variable Set String' command to make it easier to create variables for the 'Run Macro in Variable' command.
  • Optimized the 'Test Run' to run faster.
  • Optimized the 'Split String' command.
  • Made a significant performance increase when dealing with variables.
  • Fixed a bug where the command category pane would not redraw properly.
  • The icons in the Select an Icon dialog are now rearranged as the dialog is resized.
A complete list of changes is available on the version 4.2.1.1 Release Notes or the Revision History pages.


Text Type Rich Text ME Pro

Macro Express Pro now has the ability to play back text in a rich text format using the Text Type command. Select 'Paste Rich Text' from the drop down list of playback options in the 'Text Type' command dialog.

Selecting this option displays the components that you can use to create the rich text. Select different font sizes, colors and types. Also bold, underline, italicize, strike through and justify the text. Or just copy the rich text from another source, paste into the Text Type window and save.

The rich text is pasted through the clipboard and will display as rich text in any application that accepts this formatting. The text will paste as plain text into programs such as Notepad that do not support rich text.

A sample macro demonstrating this feature can be downloaded from umtexttyperichtext.mex. To use, save the macro file to your hard drive. Open the macro file or import the macro into your existing macro file by clicking File | Import | Macros.

Search on rich text in the help file to locate the Rich Text topic and learn more about this feature.


Split String, Text File Process, Join String ME Pro

Customer Dan M. posted a question on the forum:

I need to loop through all lines of a pipe-delimited text file. The goal is to parse out each of the 6 data fields per line, insert each of those 6 data fields into an interface, go to the next line, and repeat. The pipe-delimited text file includes a Header and would look like this:

  PersonID|FirstName|LastName|Age|Gender|Active
P0100|John|Smith|20|M|Y
P0200|Ashley|Williams|21|F|Y
P0300|Robert|Adams|37|M|Y

The 'Text File Begin/End Process' and 'Split String' commands make this easy.

The 'Text File Process' command repeats series of macro commands for each line in a text file. Each line from the text file is copied into a variable for each loop. The value in the value in the variable can then be used by those macro commands.

The 'Split String' command provides a quick method to break down a text string into smaller components and save each of the components to individual variable array elements. To do this, choose a character that determines where the text string should be split. This value may be any character or text string such as , comma, dash (-) or, in this case, |.

When combined, you get something like this:

  Text File Begin Process: c:\test.txt // Process each line, one at a time
    Split String "%ALine%" on "|" into %Fields%, starting at 1 // Split the line into elements of an array

    // Here the content of the fields are in %Fields[1]%, %Fields[2]%, %Fields[3]%, ... %Fields[6]%

Text File End Process

You may also perform the reverse of 'Split String', that is, combine individual array elements into a single text string, using the 'Join String' command.

These powerful, yet simple commands can accomplish in a few lines what may otherwise take dozens of lines of complex script.

Press Kit | Resellers | Affiliates | Contact Us | Site Map | Trademarks | Privacy | What is RSS?
Copyright © 2014 Insight Software Solutions, Inc. All rights reserved.
Insight Software Solutions, Inc. Home Page Insight Software Solutions, Inc. Home Page