StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Rob  
#1 Posted : Saturday, June 8, 2019 1:27:46 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 952
United States
Location: Tampa, FL

Thanks: 22 times
Was thanked: 274 time(s) in 239 post(s)
Plug-Ins are just any public .NET Class Library .DLL.

You can drop an existing .NET DLL into the Plug-Ins folder and access it via scripts.

You can also easily create your own plug-in, download Visual Studio Community (free) and create a Class Library project (.NET Framework 4.8), compile, put the DLL in the Plug-Ins folder, and reload S+.net.

Currently, S+.net just scans the plug-in folder(s) for DLL files, then uses reflection to load any public classes into the script engine(s) to be available for use in your scripts.

For example, someone wanted to extend the Snip Screen Area action to perform some image sizing. I did a quick Google search and found a .NET class which handles some basic image processing (https://github.com/omuleanu/imager).

Downloaded the project, compiled, and put the resulting DLL in the Plug-Ins folder and voilà!

Updated the script to use this plug-in (Imager is the name of the class the DLL exposes):
Code:
var newWidth = 500;
var maxHeight = 500;
var onlyResizeIfWider = true;
var resizedImage = Imager.Resize(memoryImage, newWidth, maxHeight, onlyResizeIfWider);

//Copy the image to the clipboard
clip.SetImage(resizedImage);

I'm hoping that folks step up and create their own plug-ins for themselves and others, since it's so easy and free!

Edited by user Friday, December 25, 2020 3:55:46 AM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.