• Login
Community
  • Login

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

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 573 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.
  • S
    SalviaSage
    last edited by May 25, 2019, 9:09 PM

    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.

    E 1 Reply Last reply May 25, 2019, 10:07 PM Reply Quote 0
    • E
      Ekopalypse @SalviaSage
      last edited by May 25, 2019, 10:07 PM

      @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
      • S
        SalviaSage
        last edited by May 25, 2019, 10:14 PM

        Yes, that worked.
        Thank you.

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