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?
Support PowerShell for scripting
Posted by Wobbegong on Tue 28 Oct 2014 03:20 AM — 12 posts, 45,982 views.
But why?
You don't have to install Lua, and it works on more than just the latest Windows version.
Quote:
As PowerShell is built in for latest windows, user can also benefit not having to install it.
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.
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.
Also this would be of doubtful use to people running MUSHclient using Wine, on OS/X or Linux.
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.
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.
Wobbegong said:
But, scripting whichever language you like is just a preference, isn't it?
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.
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.
Wobbegong said:
MushClient already supports VBScript which also has platform restriction to Windows.
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.
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.
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.
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.
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
Quote:
PowerShell 2.0 is supported in Wine.
https://appdb.winehq.org/objectManager.php?sClass=version&iId=19197
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.
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.
Wobbegong said:
PowerShell 2.0 is supported in Wine.
https://appdb.winehq.org/objectManager.php?sClass=version&iId=19197
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
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.
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.