Community
    • Login

    Pythonscript plugin, how to insert console code into the startup script?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 551 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SalviaSageS
      SalviaSage
      last edited by

      Okay, thanks to the Scintilla API update, I am now able to do something I have been wanting to do.

      CARETSTYLE_OVERSTRIKE_BLOCK = 16
      editor.setCaretStyle(CARETSTYLE_OVERSTRIKE_BLOCK)
      

      This code does what I want it to do, but, of course has to be inserted in through the console each time.
      So, how do I put it inside the pythonscript startup script so it would fire automatically?

      Simply placing it into the startup file did not work.
      So, does anyone know what to do?

      Thanks.

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @SalviaSage
        last edited by

        @SalviaSage

        if you want to put it into the startup.py you have to set it for both editor objects like this

        CARETSTYLE_OVERSTRIKE_BLOCK = 16
        editor1.setCaretStyle(CARETSTYLE_OVERSTRIKE_BLOCK)
        editor2.setCaretStyle(CARETSTYLE_OVERSTRIKE_BLOCK)
        
        1 Reply Last reply Reply Quote 3
        • SalviaSageS
          SalviaSage
          last edited by

          Yes, that worked.
          Thank you.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors