Startup Macro

The Startup macro/script is unique. It is the first thing that runs when Newlook starts up. Typically it is used for initialization, from connecting to a specific connection definition, through to setting session variables and specifying the master form for the session (if one exists).

There can only be one Startup macro or script for each project.

Creating a startup macro

  1. Select Logic () from the developer bar.
  2. Click the Macros button.
  3. Click the New button at the bottom of the screen.
  4. In the Properties pane on the left hand side, position your cursor in the Name field and enter the name Startup.
  5. Enter the relevant Labels, Conditions and Actions as desired.
  6. When complete click the Save button () to save your macro.

Some common reasons for using a startup macro

Startup macro vrs command line Run Macro command

In the event that you have a startup macro and you are using the -r (run macro) command or - c (connect) command on the shortcut property for Smartclient (or the Start Macro or Connection Name Startup preferences in Server) then the macro specified in the -r or the connection specified -c command will take precedence over the startup macro. In this scenario the startup macro will not run. This can be useful if you wish to specify different startup conditions for different users.

See Also

Writing Macros