Window Management Functions and new Macro Editor Options

February 18, 2023

Onetastic 5.9.0 is available with new window management functions and additional Macro Editor options to make macro development easier, along with other bug fixes and improvements.

Window Functions

A new set of functions is available to manage OneNote windows from macros. You can get the list of currently open windows, create or close existing windows; check or change which of those is the currently active window. You can also check what page/section/notebook is visible on each window and change this for each window.

To get more information about these new functions check out the following in the documentation:

Window Manager Macro


Window
Manager
A powerful new macro Window Manager is added to Macroland to demonstrate the capabilities of these new functions. It can remember all the open windows you have in OneNote and allows you to later open those back. It can be a great way to make switching from one workspace to another easier. It can be considered as an improved version of Favorites feature for multiple pages at a time.

New Macro Editor Options

Macro Editor is updated with new features that allow you to easily navigate between user defined functions, see function signatures and any mistakes you may have in your code with more red squiggles.

Function signature and descriptions on hover

Macro Editor can now display function signatures and descriptions when you hover over a function call. This can help you with checking what parameters a function accepts and what it does quickly. This works both for built-in functions and user-defined functions. Below is an example when mouse is hovered over the function call String_ToLowerCase:

Function signature and descriptions on hover

Ctrl+Click on function calls to navigate or get to documentation

You can now Ctrl+click on function calls in the editor. For user defined functions, it will switch to the function, which will make it easier to navigate around to edit or read macro code. For built-in functions, it will launch a browser window to show the documentation for the function you clicked on. In the above example it will navigate to the documentation page for the String_ToLowerCase function.

Show red squiggles for detected runtime errors

Macro Editor can now detect if you mistyped a function name or passed the wrong number of parameters to a function and show red squiggles to indicate this. You can hover over the red squiggled portion to get the error details. Some examples are shown below:

Red squiggles for detected runtime errors

More precise and highlighted syntax errors

If a macro expression contained a syntax error, previously the whole expression was grayed out and underlined with red squiggles, without telling exactly where the problem was. With this new update, the expressions are syntax highlighted even if they contain a syntax error and the red squiggles precisely show where the error is. Below is an example of before and after visuals:

Red squiggles for syntax errors

These new options require active Onetastic Dev License and are automatically enabled, but you can disable them under Macro Editor options if you desire:

Macro Editor options

We hope you enjoy the updates in the new version.

Comments

Name
Comment
Timothybot - 2023-09-26
Thanks, I've been looking for this for a long time
sbendtsen - 2023-04-11
Hi I look for  a way when I execute a desktop shortcut I want to open this in another (new) window.
Is this doable ?
JBM - 2023-03-04
Greetings: How can I view pages in a notebook as "separate - moveable-- windows"?  I'm not sure how to do this. I would like to use the new Windows Manager macro.  Thanks.

Other Posts

Show all posts