Minor modification

2007-12-01
2013-05-21
  • Greg Bullock
    Greg Bullock
    2007-12-01

    Thank you for the nice plugin, fidvo.  Good job.

    I've emailed you a minor modification to make it simpler to write scripts.  Please let me know if you don't receive it.  I hope you'll consider merging it with the main version. 

    The modification allows the user to view a hierarchical list of the available script functions and to double-click a function to insert its template into the script.

    Regards.
    Greg

     
    • skeptical
      skeptical
      2007-12-08

      Thanks also, fidvo.  Very useful, very nice! With a well-developed set of functions.  Two suggestions to make simplescript more interactive:

      - Non-modal dialog, so we can copy & paste from our documents on the fly as we build a script, and so we don't have to keep reopening simplescript after each run.

      - Make the editor (optionally) selection-aware, so that we can run only selected lines as we build up our scripts incrementally without having to comment out the rest of the script.

      And a very minor comment on wrap(): Punctuation chars should be associated with the preceding word, right now we get results like:

      This is the first sentence
      .  This is the second.

      regards,
      Bahman

       
      • fidvo
        fidvo
        2007-12-08

        Bahman:

        Thanks for the suggestions.

        Non-Modal Dialog:

        The plan is to eventually make it a dockable window.  The only reason it isn't that way right now is because it was easier just to make it a modal window, because of the way the template I used to create the plugin was set up.  Since this was my first time writinga plugin for Notepad++, I was just trying to get something working for the early versions to let people start using it.  I'll probably make it dockable in the 1.2 version.

        Selection-Aware editor:

        I assume that you're talking about highlighting part of the script in the Script Writer window and running just that part?  That's an interesting idea, and probably not too hard to implement.  I'll keep it in mind.

        Wrap():  I'm not surprised it's still buggy.  It was actually the most difficult function to write.  I thought it would be pretty simple - break only between words, right?  Unfortunately, that brings up the question of what is a word?  There are different cases depending on the character at the cutoff point and the next character after it.  Spaces, dashes, periods, other punctuation, letters, and numbers are all different cases, not to mention I had to make sure I preserved the current line breaks and dealt with words that are longer than the maximum line length.  I think I'll rewrite it from scratch for the 1.1 version.  Thanks for bringing it to my attention.