Function Repository Resource:

PrintMessage

Source Notebook

Print expressions to the messages window

Contributed by: Michael Sollami

ResourceFunction["PrintMessage"][expr]

prints expression expr to the messages window.

Details and Options

Expressions will be written to the messages window in OutputForm.
Adding the option Visible True will open the messages window if it is not already open.

Examples

Basic Examples (1) 

Print to the console:

In[1]:=
ResourceFunction["PrintMessage"]@"This is a test"
Out[1]=

Scope (1) 

Print any expression:

In[2]:=
ResourceFunction["PrintMessage"]@
 Graphics3D[
  Table[With[{p = {i, j, k}/5}, {RGBColor[p], Opacity[.75], Cuboid[p, p + .15]}], {i, 5}, {j, 5}, {k, 5}]]
Out[2]=

Options (1) 

Visible (1) 

If the Messages window is not open, you can force it to appear:

In[3]:=
ResourceFunction["PrintMessage"]["Read me!", Visible -> True]

Publisher

Michael Sollami

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 1.0.0 – 08 March 2019

License Information