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

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline uni  
#1 Posted : 20 June 2014 13:30:40(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)

New Beta Script Region 0.1.6279.17954 is available!

Extends SMath Studio with a Script Region.

List of changes (between 0.1.6279.17954 and 0.1.6279.17954 versions)

Download

Plug-in icon Script.zip (Date: 2017.03.11; File size: 3.59 MB) - 119 downloads

Credits

This is open-source project developed by Pavel Torgashov, Andrey Martynov, Viacheslav N. Mezentsev (viacheslavmezentsev@ya.ru). Sources can be found at https://smath.info/svn/public/plugins/Script/.


C# and VB.Net:
Do not use directive "using". You just need to fill function body.

List of specified namespaces (c#, vn.net):

System
System.IO
System.Xml
System.Linq
System.Text
System.Reflection
System.Collections.Generic
System.Globalization
System.Drawing
System.Drawing.Drawing2D
System.Drawing.Imaging

SMath.Manager
SMath.Control
SMath.Math
SMath.Math.Numeric

List of specified namespaces (python (import * used)):

System

SMath.Manager
SMath.Control
SMath.Math
SMath.Math.Numeric

Predefined variables available in script (c#, vn.net, python): Terms[] terms, Store store.


Links:

1. Fast Colored TextBox for Syntax Highlighting (Pavel Torgashov).
2. Runtime-генерирование .Net-кода для тех, кому некогда (Андрей Мартынов).
3. Scripting .NET Applications with IronPython (Jerome Terry).
4. SMath Studio Core documentation (chm)

Examples:

Script. CurrentDirectory.sm (6kb) downloaded 19 time(s).
Script. CurrentDirectory.pdf (24kb) downloaded 46 time(s).

Script. CurrentDirectory with Entry.sm (6kb) downloaded 13 time(s).
Script. CurrentDirectory with Entry.pdf (21kb) downloaded 21 time(s).

Script. CurrentDirectory. Simplest.sm (5kb) downloaded 16 time(s).
Script. CurrentDirectory. Simplest.pdf (19kb) downloaded 23 time(s).

Script. InOut.sm (9kb) downloaded 19 time(s).
Script. InOut.pdf (31kb) downloaded 44 time(s).

Edited by user 13 March 2017 09:40:47(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 21/06/2014(UTC)
Offline uni  
#2 Posted : 20 June 2014 18:50:01(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Updated.
uni attached the following image(s):
2014-06-20 21-47-03 SMath Studio Desktop - [CS. Example 1.sm].png
Russia forever!
Viacheslav N. Mezentsev
Offline uni  
#3 Posted : 21 June 2014 08:53:48(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Updated. Python also works but w/o syntax highlighting.
File Attachment(s):
Python. Example 1.sm (4kb) downloaded 93 time(s).
uni attached the following image(s):
2014-06-21 11-47-14 SMath Studio Desktop - [Python. Example 1.sm ].png
Russia forever!
Viacheslav N. Mezentsev
Offline uni  
#4 Posted : 28 October 2014 23:10:34(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Updated. Small improvements.

EDIT:

Test (c#).

2017-03-09_12-09-20.png

Script:

Edited by user 09 March 2017 10:11:23(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
Offline uni  
#5 Posted : 01 February 2016 20:08:32(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
The source code has been restored, updated and uploaded to svn. Something does not work yet (last example). The plugin is not available, because Release Manager can't build it (too complex I think).

Edited by user 01 February 2016 20:10:13(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 01/02/2016(UTC)
Offline uni  
#6 Posted : 02 February 2016 10:44:50(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Updated (svn). Now last example works and we are waiting when Andrey fix the Release Manager.
Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 03/02/2016(UTC)
Offline uni  
#7 Posted : 09 February 2016 07:11:56(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Updated. Now available.
Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 09/02/2016(UTC)
Offline Razonar  
#8 Posted : 24 May 2016 00:12:44(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 71
Uruguay

Was thanked: 5 time(s) in 3 post(s)
Hi Uni. Admirable work, thanks a lot for this plugin. Just few questions:

- From where plugin's take c#, vb.net and python ¿(i.e. came when plugin is downloaded)?
- ¿Can call nympi or Sci python?
- ¿Can you show how to modify some SMtah's vector or matrix variable? In other words, ¿there are an output, avoiding handling files, to smath worksheet or only can view results in the trace window?
- Not related with your plugin, but ... easy asking you: SMath don't have maple's traperror or mathcad onerror functions?

Have a nice day.

Alvaro.

Edited by user 24 May 2016 00:14:18(UTC)  | Reason: Not specified

Offline uni  
#9 Posted : 25 May 2016 10:41:58(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Originally Posted by: Razonar Go to Quoted Post
- From where plugin's take c#, vb.net and python ¿(i.e. came when plugin is downloaded)?
- ¿Can call nympi or Sci python?
- ¿Can you show how to modify some SMtah's vector or matrix variable? In other words, ¿there are an output, avoiding handling files, to smath worksheet or only can view results in the trace window?

c#, vn.net from the .Net Framework which is already installed on your PC.
As for the python I used IronPython which is a part of the plugin.
Not shure about numpi and Sci. I think it is impossible use them now.

You can modify and add definitions to the worksheet dynamically (inside the script). It not so simple to show how you can use this, I need a time to make an example.

Russia forever!
Viacheslav N. Mezentsev
Offline Tinu  
#10 Posted : 27 May 2016 14:11:50(UTC)
Tinu


Rank: Member

Groups: Registered
Joined: 04/01/2014(UTC)
Posts: 19
Man
Switzerland
Location: Bern

Was thanked: 14 time(s) in 12 post(s)
Originally Posted by: uni Go to Quoted Post

c#, vn.net from the .Net Framework which is already installed on your PC.
As for the python I used IronPython which is a part of the plugin.
Not shure about numpi and Sci. I think it is impossible use them now.

You can modify and add definitions to the worksheet dynamically (inside the script). It not so simple to show how you can use this, I need a time to make an example.



Examples (specially regarding Python) would be greatly appreciated!Clap

Tinu


thanks 1 user thanked Tinu for this useful post.
on 27/05/2016(UTC)
Offline ahmetanildindar  
#11 Posted : 06 August 2016 16:22:58(UTC)
ahmetanildindar

Rank: Newbie

Groups: Registered
Joined: 23/08/2015(UTC)
Posts: 2
Turkey

Was thanked: 1 time(s) in 1 post(s)
Dear all,
I donwloaded @uni's #3 smath file. Tried to understand but it seems more explanation is needed for low level users like me Good


It would be really perfect having Python scripts running within Smath.

Is there any ongoing effort?

++Ahmet
thanks 1 user thanked ahmetanildindar for this useful post.
on 02/03/2017(UTC)
Offline uni  
#12 Posted : 02 March 2017 07:04:24(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Updated. Variable terms added. Some namespaces declared implicit.

2017-03-02_09-01-57.png

Script:

Edited by user 09 March 2017 09:56:44(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 02/03/2017(UTC)
Offline uni  
#13 Posted : 02 March 2017 21:51:49(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Updated. Fixed some issues related to vb compiler.
Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 03/03/2017(UTC)
Offline uni  
#14 Posted : 04 March 2017 11:58:07(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Updated

Examples.

Script. CurrentDirectory.sm (6kb) downloaded 19 time(s).
Script. CurrentDirectory.pdf (24kb) downloaded 46 time(s).

Script. CurrentDirectory with Entry.sm (6kb) downloaded 13 time(s).
Script. CurrentDirectory with Entry.pdf (21kb) downloaded 21 time(s).

Script. CurrentDirectory. Simplest.sm (5kb) downloaded 16 time(s).
Script. CurrentDirectory. Simplest.pdf (19kb) downloaded 23 time(s).

Script. InOut.sm (9kb) downloaded 19 time(s).
Script. InOut.pdf (31kb) downloaded 44 time(s).

Edited by user 04 March 2017 14:32:55(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 04/03/2017(UTC)
Offline uni  
#15 Posted : 04 March 2017 18:44:52(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Updated. Now more magic available.

2017-03-04 20-42-28 SMath Studio - [Script. Lambda. Linq.sm].png

Script:

Edited by user 09 March 2017 10:16:46(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 04/03/2017(UTC)
Offline uni  
#16 Posted : 06 March 2017 13:12:14(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Updated. Another attempt to fix the problem related with the portable version. Martin, please try again. Now the tmp directory appears in the plugins directory and you need to remove it content manually periodically. Fix this later.

Edited by user 06 March 2017 13:14:43(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 06/03/2017(UTC)
Offline mkraska  
#17 Posted : 06 March 2017 17:09:45(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,222
Germany

Was thanked: 619 time(s) in 408 post(s)
Now working with the portable version, thanks. With maxima, we had quite some issues with temp dirs (interference between multiple smath instances or documents...
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
Offline uni  
#18 Posted : 08 March 2017 10:12:54(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
Add definitions from list of strings. To get a textual representation we use [Ctrl+C], [Ctrl+V].

2017-03-08 12-08-37 SMath Studio - [Script. Load definitions.sm ].png

Script:

Edited by user 09 March 2017 09:55:54(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 08/03/2017(UTC)
Offline uni  
#19 Posted : 08 March 2017 19:32:48(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
String to matrix (c#).

2017-03-08 21-31-34 SMath Studio - [Script. String to matrix.sm].png

Script:

Edited by user 09 March 2017 09:55:17(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 09/03/2017(UTC)
Offline uni  
#20 Posted : 22 March 2017 19:30:36(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 674
Man
Russian Federation

Was thanked: 517 time(s) in 335 post(s)
How to add unit.

2017-03-22 21-00-51 SMath Studio - [List1.sm ].png

Script:
Russia forever!
Viacheslav N. Mezentsev
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.