Menu

Simple Script 1.11 released - Scripts on Menu

fidvo
2008-02-07
2012-11-14
  • fidvo

    fidvo - 2008-02-07

    Simple Script Plugin 1.11

    I ran into a mental block working with variables, so I put that off for a bit while I worked on some other miscellaneous changes.

    This release includes the following:

    Minor bugfixes in IncrementToTag and IncrementFromTag functions.

    Added:

    2 new functions, especially useful for working with the Merge function.

    AppendNumberList(int LowNum, int HighNum, int LeadZero): Appends a list of numbers to the end of the document.

    AppendLetterList(string LowLetter, string HighLetter, int MakeLowerCase): Appends a list of letters or letter strings to the end of the document.

    Settings Window: Interface to SimpleScript.ini so you can work with settings, such as favorite scripts, script groups, and menu without having to edit the .ini file.

    SimpleScript.ini has now been moved to the Config folder.  If you keep it in the plugins folder it will still read it, but if you work with the settings window it will save it out to the Config folder.  I recommend you move your .ini file to the Config folder manually.

    Scripts on the Menu: You can place up to 10 scripts on the menu for quick access.

    NOTE: I couldn't figure out how to get the menu to refresh, so for now, after making changes to the scripts on the menu, you'll need to close and re-start Notepad++ before you'll see the changes.

    Also, if you assign keyboard shortcuts to the scripts on the menu, those shortcuts are assigned to the menu slot, not the script.  That means if you move a script from one menu slot to another, the shortcut remains with the previous menu slot until you change it manually.

     
    • Nobody/Anonymous

      Did I miss something or this plugin doesn't support Unicode text?

       
    • Nobody/Anonymous

      thank you very much. :-)

      I would like to ask you 2 questions:
      - is it possible with this version to applicate a script in all open files?
      - is it possible to make the functions window (the first half) (vertical) resizable?
        the window is very small on my pc (2 cm high)

       
    • Nobody/Anonymous

      btw I could not find out where to put the 10 scripts on the menu.

      Can you please add a shortcut possibility to "repeat last script"?

       
    • Nobody/Anonymous

      I put the .ini file in the config folder but simplescript does still use the one in the plugin folder

       
    • fidvo

      fidvo - 2008-02-08

      Answers to the above questions:

      1) Did I miss something or this plugin doesn't support Unicode text?

      You didn't miss anything; I'm the one who missed something.  Believe it or not, you're the first person to bring that up.  I hadn't even thought to test Unicode.

      I'll have to look into it.  I might be able to fix it by using Delphi's WideString type, but I'm not sure how that works with StringLists, which are used in a good chunk of the functions.

      I guess for now, Simple Script doesn't support Unicode.

      2) is it possible with this version to applicate a script in all open files?

      Not yet, but that's a planned feature.  I haven't done it yet because my plan for this feature involves some of the same setup as Templates and Code Snippets, so I need to add all 3 of these features at once.  In order to do Templates the way I want (allow the user to input the values for variables parsed from the template), I need to put variables in.  That's my next major planned feature.

      3) is it possible to make the functions window (the first half) (vertical) resizable?

      I suppose I could put a splitter between the function list and the function definitions.  Perhaps next version.

      4) btw I could not find out where to put the 10 scripts on the menu.

      Plugins -> Simple Script -> Settings

      Click on the Menu tab.  Select which scripts to add to which menu items (You have to add them with the Scripts tab first).  Click OK, then restart Notepad++.

      5) Can you please add a shortcut possibility to "repeat last script"?

      You can already define a shortcut for it in the Notepad++ Shortcut Mapper.

      6) I put the .ini file in the config folder but simplescript does still use the one in the plugin folder

      Hmm.  I'm pretty sure I made the .ini file in the Config folder take precendence, but it's possible I made a mistake.  I'll check it.  You can always delete the one in the Plugins folder and force it to use the one in the Config folder.

       
    • remoo

      remoo - 2008-02-09

      Thank you,

      I tried to insert a script in the menu, gave it a title clicked on load from scripts (didn't work), closed the menu in order to search my scripts in the simplescript plugin (as usual) and everything crashed.
      Could not start Notepad++a again and had to reboot.
      I changed the new version for the old one again.

       
      • fidvo

        fidvo - 2008-02-10

        Can anyone else duplicate this problem?

        It seems to work fine for me, and I can't fix it unless I can get it to happen on my computer.

         
    • Don HO

      Don HO - 2008-02-16

      Congratulation for the docking window, it doesn't make npp crash anymore. You finally made it.

      Just one thing :
      the size of dll is quite large (662 KB), I suppose the binary is compiled in debug mode.
      Could you do it in release mode so I can include it in v4.8 release?

      Don

       
      • fidvo

        fidvo - 2008-02-16

        Don:

        I would love to have you include it by default with Notepad++, but there are a couple of problems:

        1) Unless something magically happened while I wasn't paying attention, it still has the problem with locking up Notepad++ if you undock the form.

        Zobo's been working on a fix because it's a problem that's common to all Delphi plugins, so I'm hoping to hear back from him about it.

        2) Unfortunately, the file size is a drawback of programming in Delphi.  I built it with Optimization turned on, so there's not much I can do to get it smaller.

        If you decide that the file size is too much of an issue, I certainly understand if you decide not to include it.  You probably want to hold off for now anyway until I can work out the bugs.

         
        • Don HO

          Don HO - 2008-02-19

          > Unfortunately, the file size is a drawback of programming in Delphi.
          > I built it with Optimization turned on, so there's not much I can do to get it smaller.

          Helas! The size is one of important issues to make plugin included.
          Thank you anyway.

          Don

           
        • Damjan Cvetko

          Damjan Cvetko - 2008-02-16

          Fidvo.

          I hacked your plugin, "fixed" the crashing and added a few things.
          How can I send you the code, your SF mail bounces. You can send me a mail to my SF mail.

          Re,
          -Zobo

           
          • fidvo

            fidvo - 2008-02-16

            Zobo:

            I just sent you an email from my hotmail account.  Let me know if you don't receive it soon.

             
            • Damjan Cvetko

              Damjan Cvetko - 2008-02-17

              I sent two mails. You got them?
              -Zobo

               
              • fidvo

                fidvo - 2008-02-17

                I got them both.

                I'll look them over and probably have them up on the N++ plugins project page some time later today.

                Thanks.

                 
    • DV

      DV - 2008-02-16

      Can you show some warning similar to "This plugin does not support Unicode files" when one tries to modify an Unicode file with your plugin? Otherwise this Unicode file can be corrupted after the script execution.

       
      • fidvo

        fidvo - 2008-02-16

        That's a good idea.  I've been researching Delphi's support for Unicode and I hope to eventually have it work with Unicode, but that's going to involve a substantial rewrite.  I think until then, I probably ought to add a warning.

         
    • fidvo

      fidvo - 2008-02-17

      Just to give an update:

      Zobo has kindly fixed the issue with Notepad++ locking up if the user undocks the window.  However, part of that requires that I don't create the Script Writer form until the user selects it from the menu.  Unfortunately, there are some data structures on the Script Writer form that are needed for other operations of the plugin.

      I'm going to do what I should have done a long time ago, which is move those data structures into their own module and use the Script Writer form only as an interface.  Then I can create the data structures early and use them wherever they're needed.

      This means rewriting a good portion of the interface code, so it's going to be a couple of days before I have an update to the plugin available that fixes the problem.

      Thanks for your help, Zobo!  I couldn't have done it without you.