+Macros

Please read this document to have a full picture of +Macros and its features and get to know what you will get by using the product.

An upcoming article has three issues: Description – brief information about the product, Default macros – overview of basic macros and their functions, Plug-ins – overview of +Macros additional tools for code and environment management.

Product description

FoxMasters +Macros is a combination of small scripts, called macros. They help, firstly, to automate or ease access to the features of VFP environment, to get rid of repetitive actions and, secondly, extent these features by bringing new tools for development and debugging of your projects.

Source code of the product is opened for the end user, which means you can modify it as you wish. There are several ready-to-use macros included in the installation package by default. These macros can be used as a base or examples for creation of your own ones. +Macros provides an unlimited opportunity for extending an automation of your work in VFP. Each programmer constantly uses some features of the development environment. The set of such used features is a unique for each developer, that is why you decide which action you need to automate yourself. By creating a macro to solve one or more tasks, mostly done from day to day, you save time. There is an internal macrocode debugger that will surely help you. Another basic aim of our product is to ease access to either features of VFP or +Macros. We designed three ways of achieving this. The choice is yours: create a hot-key combination, use default or your own toolbars and also you can try using the default or your own menus, configured in your style.

Default macros

Indent or un-indent block

Moves the selected block of text to the left or to the right. Differs from inner feature in the way it moves the blocks. Movement is made by 1 symbol, instead of a TAB. In some cases, when you have a complex code full of sub-constructions, this macro can prevent the situation when these constructions are not visible in the editor, and you need to use scroll. Use un-indent and align your code to the left saving its structure.


Context help

Built-in call of the help with F1 just opens the contents and asks to enter a keyword. Our macro does that job for you. When you edit your code and need a quick help for the current word, just execute that macro and it will display the page with the reference.


Toggle toolbars

You can easily toggle all +Macros toolbars when you don’t need them and then bring them back when required. It’s quite convenient when working with forms and switching between designer and editor windows or when you need more space on the screen while viewing something.


Insert to text

Simplifies insertion of any text blocks, comments or code constructions into your source code. There are default templates for insertion of functions, classes, methods and comments. Just enter variable data; macros will take care of processing required syntax (e.g. to insert new function just enter its name and parameters). Methods, functions and classes by default contain a forehead comment including some information about the inserted code (user name, creation date, description, etc.). There is also a comment template that will start each of your comment with the date and user name.




Auto completion of keywords

Shows a dropdown list with all keywords that match the beginning of the current word in editor. Differs from built-in feature of VFP by the opportunity of showing the list of matching keywords even by the first letter (VFP usually requires more letters to complete the word)


Collapse and expand keywords

VFP supports either full keywords or their short variants. This macro allows expanding and collapsing keywords within selected range of code. As a result you receive a more readable or shorter code.

Before:

After:



Align assignments or comments

Usually you can face with the block of code where a lot of values are being assigned to the variables. And usually each line within that block has a different length. It is quite difficult to read such code. With the help of this macro you can align assignments, so the selected block of code will look like a table with two columns (variable names and variable value) separated by assignment operand and it will be perfect for viewing. The same action can be done with the block of code where each line ends with the comment and again has different length. You will align all comments in one column in a second. As a result of using this macro you will have a code convenient for viewing and analyzing.

Before:

After:



Inversion of quotes in string values

With this macro you can change quotes of string values from double (“text”) to single (‘text’) ones. Customize the sources up to your own style and taste.



Code Navigator

Designed for quicker and more convenient way of orienting within long source codes. Code Navigator represents the code in the tree-view structure, containing basic elements (such as functions, methods, classes) on the first level of nodes, and inner code constructions (such as for, while, select) on the second and deeper levels. So, any source code that cannot be displayed on a few pages is collapsed to the list of functions, methods or classes. On the one hand the structure list can be easily expanded and you can go to any level you want. Just double click on the item to go to it. On the other hand macro helps to analyze the structure of the file.


Forms and class members show

Use this macro when you work with forms. It gives you a full list form objects and all available members (existing members are highlighted with the bold font). For example, built-in Document View shows only existing members while with the help of our macro you can not only view structured list of the existing items, but also to create any member by double clicking on it.


Show procedures and bookmarks

This is an improved version of standard bookmarks. Firstly, all bookmarks that were set by you are saved between VFP launches, so do not worry to lose any of them, they will be right there where you left them since last time you worked with the code. Secondly, bookmarks widow contains the list of all methods, functions and classes of the current file, which affords you to see its structure and location of the existing bookmarks. And, thirdly, bookmarks window provides an opportunity to navigate within the code for setting new bookmarks by double clicks on items (functions, methods or class titles) in the list and to delete existing ones.


SQL Analyzer

Provides the developer with the opportunity for checking and debugging SQL requests without executing the whole project. Just select the line with request and launch that macro. You will get a dialog with the result and time of execution. You need to establish connection with the database only once, and then it will be a job of a macro. There is a separate window for making and debugging SQL requests (just like Command window). As a result, you save plenty of time and free your self of many troubles interconnected with SQL debugging.


View installed languages

+Macros interface supports two languages by default (Russian and English). All language strings are kept in a separate DBF file. You can easily create your own language file and edit it with the help of this macro.





Multi Clipboard

Extended clipboard that allows storing of several blocks of text in the memory (support of multi line blocks). Number of pockets for copy-paste is almost unlimited (there are 10 pockets by default, but the size can be changed in macro source code), so you can customize it whenever you like. All data stored in pockets is saved between launches of VFP.


Plug-ins

Info Center

As it is seen from the title, Info Center – is a utility that works with information. In short, that plug-in is an extended version of memory viewer (of memory that is used by your project during execution time). It helps to analyze processes that are running the interface of your program. It’s quite difficult to name the exact purpose of Info Center, but it will be more reliable to say that it provides you with the tools for understanding business logic of your projects. These are some features:

  • Structured view of memory objects (improved Watches)
  • Variables monitoring (including support of variable name auto completion)
  • Built-in SQL debugger
  • Support of multi sessions (there is no need to halt the execution of a project, if you need to open and/or analyze, view any table or file)

All actions made within Info Center have temporary character, because all of them will not influence on the process of execution of the project and will be undone when you close Info Center). In other words, Info Center allows you to pause execution of the project on any step and to analyze the memory area. By using Info Center you get a powerful debugging tool.

If you still have questions about FoxMasters +Macros, refer to the manual or ask us a question online. Thank you for the interest to our product!

Download Macros

Register Macros