[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  Support PowerShell for scripting

Support PowerShell for scripting

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Wobbegong   (3 posts)  [Biography] bio
Date Tue 28 Oct 2014 03:20 AM (UTC)
Message
It would be really nice if I could use PowerShell for scripting Mushclient. As PowerShell is built in for latest windows, user can also benefit not having to install it. But now sure whether this is feasible?
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Tue 28 Oct 2014 04:10 AM (UTC)

Amended on Tue 28 Oct 2014 04:11 AM (UTC) by Fiendish

Message
But why?

Quote:
As PowerShell is built in for latest windows, user can also benefit not having to install it.

You don't have to install Lua, and it works on more than just the latest Windows version.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Tue 28 Oct 2014 04:21 AM (UTC)
Message
Judging by this Windows PowerShell you would need .NET installed, and I have no desire to force people to download megabytes of .NET code to run MUSHclient.

Also this would be of doubtful use to people running MUSHclient using Wine, on OS/X or Linux.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Wobbegong   (3 posts)  [Biography] bio
Date Reply #3 on Tue 28 Oct 2014 05:02 AM (UTC)

Amended on Tue 28 Oct 2014 05:34 AM (UTC) by Wobbegong

Message
Well, I agree that we already have several different scripting languages available. And some of them has better aspects than the others. But, scripting whichever language you like is just a preference, isn't it? MushClient already supports VBScript which also has platform restriction to Windows. So, I thought it would be nice to have PowerShell supported as well. That's all.

I wouldn't think supporting PowerShell means forcing users to install .Net framework for MushClient. It will be just a limitation on those users who choose to use PowerShell for scripting, isn't it? - Just like you need to install Python engine to use Python for scripting MushClient. But, this is just my assumption and I may be mistaken.
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #4 on Tue 28 Oct 2014 05:59 PM (UTC)

Amended on Tue 28 Oct 2014 06:01 PM (UTC) by Fiendish

Message
Wobbegong said:

But, scripting whichever language you like is just a preference, isn't it?

At some point you have to either stop supporting arbitrary preferences or figure out a way to do it that extends itself without further effort. My preference could be to use Erlang one day, but it would be silly to try to support that specifically.

Quote:
MushClient already supports VBScript which also has platform restriction to Windows.

Well, technically not. MUSHclient supports the Windows Script Host, which in turn supports a whole long list of languages. VBScript happens to be one of those languages. Now you might be able to make an argument to change the language selection interface to be able to choose from any of the WSH languages with the caveat that an engine is required.

And with that change you'd suddenly get a whole long list of new language options, but PowerShell would still not be one of them, and Lua would still be the best language to use for a bunch of reasons.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Tue 28 Oct 2014 08:30 PM (UTC)
Message
Wobbegong said:

MushClient already supports VBScript which also has platform restriction to Windows.


Well, the client runs on Windows, so that in itself is not a big limitation. And we have seen that it also runs on Windows "emulators" like Wine. And yes I know Wine stands for Wine Is Not an Emulator.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #6 on Wed 29 Oct 2014 02:50 PM (UTC)
Message
Quote:
And we have seen that it also runs on Windows "emulators" like Wine. And yes I know Wine stands for Wine Is Not an Emulator.

Call it a Win32 API translator.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Wobbegong   (3 posts)  [Biography] bio
Date Reply #7 on Thu 30 Oct 2014 02:03 AM (UTC)
Message
Nick Gammon said:

Well, the client runs on Windows, so that in itself is not a big limitation. And we have seen that it also runs on Windows "emulators" like Wine. And yes I know Wine stands for Wine Is Not an Emulator.


PowerShell 2.0 is supported in Wine.

https://appdb.winehq.org/objectManager.php?sClass=version&iId=19197
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #8 on Thu 30 Oct 2014 02:19 PM (UTC)

Amended on Thu 30 Oct 2014 02:28 PM (UTC) by Fiendish

Message
Quote:
PowerShell 2.0 is supported in Wine.

https://appdb.winehq.org/objectManager.php?sClass=version&iId=19197


Ok, so...

1) That link does not show that it works. That link specifically shows that in Wine 1.1.37 in 2010 it did not work. There is no information in your link about whether it works today on a recent version of Wine.

2) Let's assume for the moment that it works flawlessly. Whether it works or not is irrelevant, and Nick shouldn't get sucked down that hole.

What matters is whether adding support for yet another arbitrary scripting language is a good idea when we already have several very good ones and one great one that is fast, easy, and works everywhere without installation.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #9 on Thu 30 Oct 2014 04:25 PM (UTC)
Message
Honestly, the only compelling reason I can see to need another scripting language supported is to add an essential functionality to MC that can't be provided any other way. Lua is about as easy as it gets to learn for even completely clueless coders, certainly easier than anything else available today, and damned near as powerful as using c++ without needing a compiler every time you change something.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #10 on Thu 30 Oct 2014 07:52 PM (UTC)
Message
Wobbegong said:

PowerShell 2.0 is supported in Wine.

https://appdb.winehq.org/objectManager.php?sClass=version&iId=19197


I hadn't followed the link before Fiendish commented, but it was amusing to read (on that page):

Quote:

Selected Test Results (selected in 'Test Results' table below)

What works
Nothing

What does not
Installation

Rating
Garbage


So, not very convincing, I'm afraid.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #11 on Thu 30 Oct 2014 07:56 PM (UTC)
Message
From what I've read it is a shell scripting language. That is, it would help do/automate shell commands. This is somewhat different to "host" scripting which MUSHclient supports. To do things like add a trigger, we don't use the Windows Shell. I just can't see how it would be helpful in situations like reacting to a mob entering a room.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


28,899 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]