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



  • 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.



  • @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)
    


  • Yes, that worked.
    Thank you.


Log in to reply