.. meta:: :description: Extensions Generic Actions Generic Actions =============== This section explains how to create and edit generic actions. Usage ----- A generic action is a simple way to access common tasks from the keyboard or the mouse. Actions can also be defined as element of a plugin. .. _filesLocationGenericActionExtension: File location ------------- To be recognized by the application, generic actions should be located in one of these folders: - %LocalAppData%/ORS/Dragonfly(*version*)/pythonUserExtensions/GenericActions (available for the current user) - %ProgramData%/ORS/Dragonfly(*version*)/pythonAllUsersExtensions/GenericActions (available for all users) - %ProgramData%/ORS/Dragonfly(*version*)/python/OrsPythonPlugins/OrsGenericAction/actions (distributed with the application) File creation ------------- To create a generic action, start the application, start the :mod:`OrsPythonPlugins.OrsGenericActionGenerator.OrsGenericActionGenerator` (found in *Developer/Generic Action Generator*), fill in the required fields and press the button *Create action*. File edition ------------ Open the file in a text editor. Fill in the required methods. For more information about actions, see :func:`ORSServiceClass.decorators.infrastructure.action`. Demos ----- Source code example: #. Download the :download:`file `; #. Put that file into a :ref:`generic action extension folder `; #. Start the application; #. Open the Preferences and look in the *Configurable Actions* section for the name *Demo: open folder pythonUserExtensions*. Set an unused keyboard key for that action, apply the changes and exit the Preferences; #. By using the specified action key, a file explorer will be opened at the *pythonUserExtensions* folder.