~~Title: OnInit ~~
The **OnInit** event is called once for each [[:scripting:script_add-ins|script add-in]] to initialize it. The event will be called on program startup, and also if a script is added or edited while Opus is already running. Implementing the **OnInit** event is optional, but highly recommended as it allows you to provide a name, description and other information to be shown to the user in Preferences. It also provides a way for a script to [[:scripting:example_scripts:adding_a_new_internal_command|add internal commands]] and [[:scripting:example_scripts:adding_a_new_column|columns]] (although the **[[onaddcommands|OnAddCommands]]** and **[[onaddcolumns|OnAddColumns]]** methods provide a better way to do this).
$$ (#)**Method Name:**
$$ OnInit
$$ (#)**Argument Type:**
$$ **[[..:scripting_objects:scriptinitdata|ScriptInitData]]**
$$ (#)**Return Type:**
$$ //bool//
$$ (#)**Description:**
$$ When Opus starts up, or when a script add-in is added or edited, its **OnInit** method is called. This gives the script a chance to tell Opus something about itself, by setting the various properties of the **ScriptInitData** object. The **AddCommand** method can also be used from this event to [[:scripting:example_scripts:adding_a_new_internal_command|add internal commands ]]to the Opus command set, and AddColumn method can be used to add [[:scripting:example_scripts:adding_a_new_column|columns]].\\
If you return **True** from this method, the script will be disabled until the next time **OnInit** is called (which normally would be the next time Opus is run). For instance, you might want to do this if the version of Windows isn't appropriate for your script.