Menu

Simple Script 1.05 released

fidvo
2007-12-19
2012-11-14
  • fidvo

    fidvo - 2007-12-19

    I just uploaded Simple Script version 1.05.  It doesn't have all of the functions I was planning for version 1.1, which is why it's not called 1.1.  I figured I'd better get something up now because I won't have much time to work on it during the holidays.

    New features:

    About a dozen new clipboard functions (cutting, copying, pasting)

    Other functions:

    transformchars(alphabet1,alphabet2): replaces all characters in alphabet1 with the characters in the same position in alphabet2.

    setcharlengths(char,minchars,maxchars,threshhold): Forces strings of the character to a certain minimum and maximum length.

    increment(offset,append): Increments by offset all lines as if they were numbers.

    I modified the behavior of the wrap function to be more consistent with traditional word wrapping (Thanks to whoever caught this error.  I couldn't find the thread where this was suggested).

    And thanks to the coding done by Greg Bullock, it now includes a function list that allows you to double-click on a function to add it to the current script.

    Note to Greg:  I changed the interface a little, and it loads the readme text from within the plugin itself, so it doesn't require the readme to be in the plugins folder.

    The function list also displays the description when you single-click on a function.  I plan to change it later to display the more detailed description from the readme, which is often more useful.

    Download and have fun, everyone!

     
    • Greg Bullock

      Greg Bullock - 2007-12-20

      Well done, sir!  Thank you.

      Regards.
      Greg

       
    • Nobody/Anonymous

      Found it... I was just checking the npp-plugins project page for the "general" Plug-In Development forum... Is it convenient to have to keep checking multiple forums? Since the plug-ins have their own project (you can't download them from the N++ project pages), I think it would make more sense to keep all the related forums on its own project pages, too.

       
    • Nobody/Anonymous

      Are all the functions for the Simple Script Plug-In based on some code you wrote for your earlier project?
      I don't see a replace function with regex feature, so I guess you coded all the functionality yourself.

      Would it be possible to use Notepad++ or the Scintilla component's code to perform therein existing actions?
      This would allow using their find and replace functions, with or without regular expressions.
      It would be very nice if this could be done.
      It might speed up the "custom coded" search function, but I'm not sure about that.

      I would like to start using scripts, but part of the actions are replace statements depending on regular expressions.

       
      • fidvo

        fidvo - 2007-12-20

        All of the code for the functions I wrote myself, either borrowing it from my previous projects or creating it new for Simple Script.

        I doubt I could use Notepad++ or Scintilla components for regular expressions because all of the text processing is happening "off screen."  In other words, I read in the document or selected text, do the processing, and then send the result back to Notepad++.

        There are several reasons for this.  For example:

        1) If it runs into an error during the processing, the result is never sent back to Notepad++, so the document is not left in a partially updated state.

        2) If you don't like the result of a script you've just run, you can just use a single Undo to get the document back to its previous state.

        3) It's just easier for me to code it that way.

        If I were to use Scintilla's regular expression searching, I would have to search in the active document, not in the off-screen text, which would mean updating the document for each line of the script.

        Believe me, I would love to add regular expression support to Simple Script, but unless I can find a GPL-licensed regex library for Delphi, I don't think it's going to happen.  I'm not competent enough to code an entire regular expression parser myself.