-
-
Notifications
You must be signed in to change notification settings - Fork 26
Scripting
?> XClipper allows you to register scripts on Copy & Paste action. During the action it will run those scripts & based on the returned result (boolean
) will define if the action should abort or not.
Scripting in XClipper uses CSScript engine (a C# scripting technology) & can be called during on copy or paste action.
- Each script must contain a function with a
clip
parameter & must returntrue
orfalse
. If a function returnstrue
then the action will be aborted. - Scripts can be added from
Settings
>Scripting
. - Only text & image (location) is supported,
- Make sure you do not spend too much time in script otherwise the action will be delayed which will deteriorate the application performance.
Whenever a copy (i.e Ctrl + C) or paste action is detected. The registered scripts will run before saving the data into the database. You can modify the content within the script & must return false
to proceed the next chain.
If any script during this process returns true
then the whole operation is aborted & the action is discontinued.
This is useful if you need to modify the incoming data maybe format or replace some characters or to avoid certain text to be ever stored in the database. Well, depending on your use-case you can create the scripts.
- Go to
Settings
>Scripting
tab. From here you can add/edit or delete copy or paste scripts.
- The one which are strike throughed (eg:
New Script) are disabled & will not be run during the action. - Click on Add (➕) button to add a new script.