~~Title: Scripting ~~ The Directory Opus scripting interface lets you write scripts using any installed ActiveX-scripting language. This allows scripts to be written in common languages which you may already know. JScript (a relative of JavaScript) and VBScript are built into Windows and usually the easiest choices when it comes to compatibility, help and examples from the Directory Opus support forum, and easy sharing with other users. Other languages like Perlscript and Python can be obtained from third-party providers. With the scripting interface you can, for example: * Query the state of Listers, tabs, paths and toolbars * Obtain lists of files and folders and discover information about them (basic information like name, size, date modified, etc, as well as metadata like EXIF information, MP3 tags, etc) * Write buttons and hotkeys functions purely from script code without resorting to "Rename" hacks * Test the state of certain system settings (similar to **@ifset** in a traditional function) * Build collections of files and run commands (Opus internal commands and external programs) on them * Display dialogs and popup menus * Access the clipboard, environment variables and folder aliases * Extend the list of Opus internal commands * Add additional file and folder information columns that can be displayed in file displays and infotips * Automatically trigger scripts based on certain events * Save and load configuration (Opus provides an editor that you can use to edit your script config) The scripting interface is present as a series of objects that export methods you can invoke and properties you can query (and sometimes set). There are three ways to use scripts with Opus. * **[[~rename_scripts|Rename Scripts]]** let you write a script within the [[.file_operations:renaming_files:advanced_rename|Advanced Rename]] dialog that gives complete control over file renaming.  * **[[~script_functions|Script Functions]]** are scripts that are [[.customize:creating_your_own_buttons|defined directly in a button, menu or hotkey]].\\ * **[[~script_add-ins|Script Add-ins]]** are script files that are installed in the Opus //Script Addins// folder. Whereas Script Functions are user-driven (e.g. they execute when the user clicks a button to specifically run the script), script add-ins are event driven. They provide one or more defined event handlers that Opus will invoke in certain situations, and are also used to implement [[~example_scripts:adding_a_new_internal_command|custom commands]] and [[~example_scripts:adding_a_new_column|columns]]. See the [[scripting|Scripting Reference]] section for a complete guide to the Opus scripting objects, and the [[~example_scripts|Example Scripts]] section for some examples of the various types of scripts. Any errors/warnings or text output from a script (via the **DOpus.Output** function) will be displayed in the //Script Log// panel (part of the //Utility Panel//). You can choose the type of information to display in the log using the **[[.preferences:preferences_categories:miscellaneous:advanced_options|Preferences / Miscellaneous / Advanced]]: script_output_level** option. You can also use the **[[.additional_functionality:cli|CLI]]** tool to design and test ad-hoc scripts. More: [[.reference:scripting_reference|Scripting Reference]]\\ [[~rename_scripts|Rename Scripts]]\\ [[~script_functions|Script Functions]]\\ [[~script_dialogs|Script Dialogs]]\\ [[~script_add-ins|Script Add-ins]]\\ [[~resources|Resources]]\\ [[~example_scripts|Example Scripts]]\\