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 Otter  
#1 Posted : Friday, December 4, 2020 6:33:12 AM(UTC)
Rob Otter

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 10/26/2020(UTC)
Posts: 50
Germany
Location: Darmstadt

Thanks: 15 times
Was thanked: 2 time(s) in 2 post(s)
Hi Rob,

on some occasions, I need to use specific Windows classes for my scripts. For this S+ provides some wrapper objects like clr, forms, drawing, ...
But my problem is that I cannot find a list of wrapper objects and which classes & namespace they give access to. How can I find out about that?
Just as an example, I know that forms let me use classes within System.Windows.Forms.* and drawing gives access to System.Drawing.* - but what about, let´s say, System.Windows.Input? I tried wrapper input but it does not exist.
As said, these are just examples, I would really like to have a documentation that I can rely on. Isn´t it existing (yet) or is it me having not searched hard enough?
Rob  
#2 Posted : Friday, December 4, 2020 9:42:45 AM(UTC)
Rob

Rank: Administration

Reputation:

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

Thanks: 28 times
Was thanked: 419 time(s) in 356 post(s)
When you click Script Help, the first page (.NET and ClearScript) shows the objects. However, in the next update I will be removing the entry for windows - System.Windows since that is a WPF namespace and S+ is a WinForms application, so the windows object is essentially empty. Also will update sysinfo to fully qualify the namespace as shown below.

Code:
clr = mscorlib, System, System.Core
drawing = System.Drawing
forms = System.Windows.Forms
net = System.Net
http = System.Net.Http
host = ExtendedHostFunctions (see ClearScript help)
clip = System.Windows.Forms.Clipboard
sysinfo = System.Windows.Forms.SystemInformation
speech = System.Speech

The scope of these namespaces is essentially limited to the classes contained in the primary DLL for the namespace.

For example, forms is the System.Windows.Forms.dll, as listed here (right below the namespace):
https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.cursors?view=netframework-4.6.2

Or for mscorlib for the clr.Microsoft.Win32 class in mscorlib.dll:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.registry?view=netframework-4.6.2

So if it's not listed, there's no wrapper for it exposed to the script engine. Each type library included increases the load time and memory usage (multiplied by the number of script engines active), so I try to keep it to the basics (except speech, that was an early special request).
Users browsing this topic
Guest
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.