Commands & Syntax >

General Macro Syntax Basics

www.perfectkeyboard.com

 

The simplest general macro is just a free text like "Hello World!".  When the macro is played back, either (i) sequence of keystrokes representing this text is sent so that the text is "typed" to the target application (application that is active - i.e., receiving keyboard focus) or (ii) the text is placed to clipboard and is pasted to the active application by Ctrl+C hot-key shortcut (the active application must support such "paste" operation). It is configurable in macro as well as in program settings if keystrokes or clipboard is used. Such simple macros are used to quickly insert often used pieces of text (phrases, e-mail addresses, paragraphs, etc.) to different applications and documents. However, macros can also contain useful commands.  If there is a command within the macro then it is automatically recognized and executed. Commands have its special syntax that looks like this:

<some_command>("param1", param2, ...)

An example of macro that combines a free text is as follows:

Tomorrow - <date>(21,"/",1,1,0,"") - we are going to...

The macro is presented and editable in this textual format if "Macro Text" is selected in macro editor. If "Macro Steps" is selected then the macro is presented and edited as a sequence of steps like this:

It depends on the Perfect Keyboard usage - mostly used as text replacement utility or mostly used to write complex macros with many commands - what is the more appropriate way how to edit macros - as Macro Text or Macro Steps.

Note: There is a command <cmds> ("Macro execution: Ignore free text, execute ONLY COMMANDS") causing that only macro commands are executed and any other text (including new lines) is ignored.