[MSH] Which editors do people prefer?

Discussion in 'Scripting' started by Andrew Watt [MVP - InfoPath], Oct 12, 2005.

  1. I was wondering which editors users of the MSH/Monad beta find best.

    Notepad?

    Something like PrimalScript?

    Something else?

    Is anyone aware of any editors with plans to provide Intellisense (or
    similar) for Monad?

    Thanks

    Andrew Watt
    MVP - InfoPath
     
    Andrew Watt [MVP - InfoPath], Oct 12, 2005
    #1
    1. Advertisements

  2. Andrew Watt [MVP - InfoPath]

    maximillianx Guest

    For freeware, PSPad isn't too bad - http://www.pspad.com, as well as Crimson
    Editor - http://www.crimsoneditor.com. They both have color syntax
    highlighting, and pspad is updated pretty frequently (Crimson is not).

    I still like UltraEdit32 (payware, but well worth it).

    I've heard many folks really like PrimalScript - I suppose that's more of an
    IDE, whereas the others are just text editors.

    Rob
     
    maximillianx, Oct 12, 2005
    #2
    1. Advertisements

  3. Andrew Watt [MVP - InfoPath]

    Yimin Wei Guest

    Did you get to invoke MSH from TextPad? I tried to set one up but
    whenever I run it, it get this message:

    A critical error has occurred.
    mscorlib: System.IO.IOException: The handle is invalid.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.VerifyHandleIsSync()
    at System.IO.FileStream..ctor(SafeFileHandle handle, FileAccess
    access, Int32 bufferSize, Boolean isAsync)
    at System.IO.FileStream..ctor(SafeFileHandle handle, FileAccess access)
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.InitializeStandardInputReader(IntPtr
    stdHandle)
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.IsStandardHandleRedirected(StandardHandleId
    handleId, Boolean& isHandleRedirectionDetermined, Boolean&
    isHandleRedirected, InitializeStandardHandleDelegate handleInit)
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.get_IsStandardInputRedirected()
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.get_IsRunningAsync()
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.InitializeRunspaceHelper(String
    command, Executor exec, ExecutionOptions options)
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.InitializeRunspace(String
    initialCommand, Boolean skipProfiles, Collection`1 initialCommandArgs)
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.DoRunspaceLoop(String
    initialCommand, Boolean skipProfiles, Collection`1 initialCommandArgs)


    Unhandled Exception: System.IO.IOException: The handle is invalid.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.VerifyHandleIsSync()
    at System.IO.FileStream..ctor(SafeFileHandle handle, FileAccess
    access, Int32 bufferSize, Boolean isAsync)
    at System.IO.FileStream..ctor(SafeFileHandle handle, FileAccess access)
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.InitializeStandardInputReader(IntPtr
    stdHandle)
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.IsStandardHandleRedirected(StandardHandleId
    handleId, Boolean& isHandleRedirectionDetermined, Boolean&
    isHandleRedirected, InitializeStandardHandleDelegate handleInit)
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.get_IsStandardInputRedirected()
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.get_IsRunningAsync()
    at
    Microsoft.Management.Automation.Internal.ConsoleHostUserInterface.Write(String
    value)
    at
    Microsoft.Management.Automation.Internal.ConsoleHostUserInterface.WriteLine(String
    value)
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.DoRunspaceLoop(String
    initialCommand, Boolean skipProfiles, Collection`1 initialCommandArgs)
    at Microsoft.Management.Automation.Internal.ConsoleHost.Run(String
    bannerText, String helpText, String[] args)
    at
    Microsoft.Management.Automation.Internal.ConsoleHost.Start(RunspaceConfiguration
    configuration, String bannerText, String helpText, String[] args)
    at
    Microsoft.Management.Automation.ConsoleShell.Start(RunspaceConfiguration
    configuration, String bannerText, String helpText, String[] args)
    at
    Microsoft.Management.Automation.CustomRunspaceConfiguration.Main(String[]
    args)

    Tool completed with exit code -532459699


    Any ideas? Thanks.

    Yimin Wei
     
    Yimin Wei, Oct 12, 2005
    #3
  4. If i remember correctly, it just worked by default in some previous drop.
    (But it's a long time since i last tried running MSH from TextPad.)

    With the current MSH drop i had to check the "Suppress output until
    completed" checkbox in the tool settings in TextPad to get it working.
     
    Jouko Kynsijärvi, Oct 12, 2005
    #4
  5. Andrew Watt [MVP - InfoPath]

    Yimin Wei Guest

    Ok, I checked the "Suppress output until completed" checkbox and I got
    this message.

    'C:\Documents' is not recognized as a Cmdlet, function, operable
    program, or sc
    ript file.
    At line:1 char:13
    + C:\Documents <<<< and Settings\user\My Documents\MSH\test.msh


    It seems that it doesn't take the path with space in it pretty well. I
    then moved my test script to a folder c:\bin which doesn't have space in
    the path and it worked. In summary, for TextPad to invoke MSH, you need
    to do the following:

    1. Setup the MSH tool in TextPad with "Suppress output until completed"
    checked.
    2. Put the scripts in a folder which has no space in the path.

    Yimin Wei
     
    Yimin Wei, Oct 12, 2005
    #5
  6. I got the folder with spaces working by changing the Parameters field in
    TextPad tool settings into:

    "&""$File"""

    With file such as C:\Documents and Settings\test.msh it executes the
    following in MSH:

    &"C:\Documents and Settings\test.msh"

    (I could have also used "&'$File'", but ' is a legal character in
    filenames...)
     
    Jouko Kynsijärvi, Oct 12, 2005
    #6
  7. Yes, this gets confusing since MSH itself needs to see the script path as a
    block, and bare quotes are stripped on their way into MSH. Here's an
    alternative way to set up the commandline parameters:
    -NoLogo -NonInteractive "& '$File'"
    Another one that should work is TextPad's $DOSFile macro, and in that case
    you don't need the quotes or &:
    --NoLogo -NonInteractive $DOSFile
     
    Alex K. Angelopoulos \(MVP\), Oct 12, 2005
    #7
  8. Oops. I knew I was overlooking something in my version...
     
    Alex K. Angelopoulos \(MVP\), Oct 12, 2005
    #8
  9. Andrew Watt [MVP - InfoPath]

    Thomas Lee Guest

    Textpad
     
    Thomas Lee, Oct 15, 2005
    #9
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.