System Event

 

The System Event activation looks for changes to the system. The macro starts when the specified system change occurs.

 

 

Macro Express Explorer > Macro > Add Macro - Or click on New Macro Icon

 

 

Incoming Message

Windows is a message based operating system. There are messages broadcast throughout the system when certain events occur, such as when a hardware component is added or removed.

 

This is another way for custom applications to launch macros. Rather than passing the nickname through the postmessage routine, use this method to post a single message.

 

When using the Incoming Message activation, select from the four types of messages available.

 

Use Constants File

The user specifies an ini file containing a list of constant names and their values. The "Message to Post" field should contain a constant name from this file.

 

An example would be the WM_LBUTTONDOWN message in the PostMessage.ini file. In the file, the following line appears:

 

WM_LBUTTONDOWN=513

 

This means that when the user specifies WM_LBUTTONDOWN as the message, message 513 is actually sent.

 

 

Constants File    

The user specifies in the "Message to Post" field a message number to send to the specified control.

 

 

Offset from WM_USER

WM_USER is a Windows constant that marks the beginning of the messages that programmers can use for anything. In this case, the user specifies either a positive or negative number that is added to WM_USER. Currently, Windows defines WM_USER as 1024.

 

 

Use RegisterWindowMessage

This command allows the user to enter a constant string that can be used by Windows to generate a message. This is primarily used to communicate with other applications that have registered the same message.

 

 

Microsoft Definition of RegisterWindowMessage

 

The RegisterWindowMessage function defines a new window message that is guaranteed to be unique throughout the system. The message value can be used when sending or posting messages.

 

The RegisterWindowMessage function is typically used to register messages for communicating between two cooperating applications.

 

If two different applications register the same message string, the applications return the same message value. The message remains registered until the session ends.

 

Only use RegisterWindowMessage when more than one application must process the same message. For sending private messages within a window class, an application can use any integer in the range WM_USER through 0x7FFF.

 

 

Message

The message input into this field comes from one of three sources. The message will be a constant from the Constants file, a string passed to RegisterWindowMessage, or a value from WM_USER.

 

WParam - LParam

These fields allow the user to specify the WParam and LParam parameters. The contents of these parameters depend upon the message being sent. These values can be found in the Platform API library at https://msdn.microsoft.com.

 

Note: Consult https://msdn.microsoft.com for a list of messages available.

 

Note: When Macro Express is installed, three .ini files ( PostMessage.ini, PostCommCtrl.ini and PostRichEdit.ini ) are also installed into the Macro Express folder. The default path is C:\Program Files (x86)\Macro Express Pro 6. These .ini files contain message definitions that can be used for reference. Double click on the files to open and view in Notepad or Wordpad.

 

 

System Colors Change

Use this option to start a macro when a change is made to the Windows system colors on the computer.
 

 

Resolution Change

Use this option to activate a macro when the system's screen resolution is changed.

 

 


 

 

Macro Nickname

Optionally assign a name to the macro to later more help readily determine what the macro does.

 

 

Build as a Popup Menu

Select this option and click on the OK button to open the Menu Builder and create a popup menu.