• Login
Community
  • Login

[UDL] Labels highlight In Custom Batch Doesn't Work As Expected

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
31 Posts 4 Posters 2.6k 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.
  • E
    Ekopalypse
    last edited by Ekopalypse May 26, 2020, 6:58 PM May 26, 2020, 6:57 PM

    Seems to work for me

    590e8cf3-ab15-40b8-8a74-a138cc93a8db-image.png

    Could it be that you did the changes but haven’t restarted npp?
    If so, sorry, there is no restart mechanism in the script - maybe I should add one. What I do, normally, is to edit the script, then run another instance of npp to see if the changes are good and if not, close the new instance, reedit, restart a new instance …
    Not very user friendly but most of the time I only need one or two shots to make it work and see if the changes are good.

    1 Reply Last reply Reply Quote 2
    • V
      Vin dickator
      last edited by May 26, 2020, 7:04 PM

      I actually did restart several times, I suppose I did a faulty installation with the PythonScript… I’ll redo that one more time,

      E 1 Reply Last reply May 26, 2020, 7:07 PM Reply Quote 0
      • E
        Ekopalypse @Vin dickator
        last edited by May 26, 2020, 7:07 PM

        @Vin-dickator

        you can check if your PS installation is ok by opening the console from
        Plugins->Pythonscript->Show Console
        and enter something like notepad.getPluginVersion() in the run box

        607d915d-2ef1-4152-a1cf-a245693aba15-image.png

        If this works, then installation is ok.

        V 1 Reply Last reply May 26, 2020, 7:33 PM Reply Quote 1
        • V
          Vin dickator @Ekopalypse
          last edited by May 26, 2020, 7:33 PM

          @Ekopalypse

          I just did a new installation of the PythonScript (last time, manually through zip, this time through msi)

          It’s strange, it does return the version, but it also shows other things for me

          Python 2.7.6-notepad++ r2 (default, Apr 21 2014, 19:26:54) [MSC v.1600 32 bit (Intel)]
          Initialisation took 32ms
          Ready.
          Traceback (most recent call last):
            File "C:\K\OD\Stuff\Soft\Notepad++\plugins\PythonScript\scripts\EnhanceUDLLexer.py", line 260, in <module>
              EnhanceUDLLexer().main()
            File "C:\K\OD\Stuff\Soft\Notepad++\plugins\PythonScript\scripts\EnhanceUDLLexer.py", line 72, in __call__
              cls._instance = super(SingletonEnhanceUDLLexer, cls).__call__(*args, **kwargs)
            File "C:\K\OD\Stuff\Soft\Notepad++\plugins\PythonScript\scripts\EnhanceUDLLexer.py", line 100, in __init__
              self.configure()
            File "C:\K\OD\Stuff\Soft\Notepad++\plugins\PythonScript\scripts\EnhanceUDLLexer.py", line 179, in configure
              editor1.indicSetStyle(0, INDICATORSTYLE.TEXTFORE)
          AttributeError: type object 'INDICATORSTYLE' has no attribute 'TEXTFORE'
          >>> notepad.getPluginVersion()
          '1.0.8.0'
          
          
          E 1 Reply Last reply May 26, 2020, 7:35 PM Reply Quote 0
          • E
            Ekopalypse @Vin dickator
            last edited by May 26, 2020, 7:35 PM

            @Vin-dickator

            that is actually a very old version. Any particular reason
            why you need to use it? What is your npp version?
            Can be checked from the ? menu->Debug info.

            V 1 Reply Last reply May 26, 2020, 7:42 PM Reply Quote 1
            • V
              Vin dickator @Ekopalypse
              last edited by Vin dickator May 26, 2020, 7:44 PM May 26, 2020, 7:42 PM

              @Ekopalypse
              Just haven’t gotten around to using the new version yet… planning for someday because mine is portable and has files mixed up inside…

              Please see below debug info

              Notepad++ v7.6.6   (32-bit)
              Build time : Apr  3 2019 - 23:49:50
              Path : C:\K\OD\Stuff\Soft\Notepad++\notepad++.exe
              Admin mode : OFF
              Local Conf mode : ON
              OS : Windows 10 (64-bit)
              Plugins : ColorPicker.dll ComparePlugin.dll LanguageHelp.dll mimeTools.dll NppCCompletionPlugin.dll NppConverter.dll NppExport.dll NppFavorites.dll NppFTP.dll NppJavaScript.dll NppQCP.dll NppSaveAsAdmin.dll NppSnippets.dll NppTextFX.dll PyNPP.dll PythonScript.dll RunMe.dll SearchPlus.dll SpellChecker.dll XMLTools.dll _CustomizeToolbar.dll
              

              Edit: oh you mean the python version… this is what came with the msi

              E 1 Reply Last reply May 26, 2020, 7:44 PM Reply Quote 0
              • E
                Ekopalypse @Vin dickator
                last edited by Ekopalypse May 26, 2020, 7:44 PM May 26, 2020, 7:44 PM

                @Vin-dickator

                let’s see if we can make it work.
                There are two lines here (saying two shoing four :-D )

                            editor1.indicSetStyle(0, INDICATORSTYLE.TEXTFORE)
                            editor1.indicSetFlags(0, SC_INDICFLAG_VALUEFORE)
                            editor2.indicSetStyle(0, INDICATORSTYLE.TEXTFORE)
                            editor2.indicSetFlags(0, SC_INDICFLAG_VALUEFORE)
                

                replace INDICATORSTYLE.TEXTFORE by the value 17.
                Hopefully this is the only missing declaration.

                V 1 Reply Last reply May 26, 2020, 7:50 PM Reply Quote 2
                • V
                  Vin dickator @Ekopalypse
                  last edited by May 26, 2020, 7:50 PM

                  @Ekopalypse :'(

                              editor1.indicSetStyle(0, 17)
                              editor1.indicSetFlags(0, SC_INDICFLAG_VALUEFORE)
                              editor2.indicSetStyle(0, 17)
                              editor2.indicSetFlags(0, SC_INDICFLAG_VALUEFORE)
                  

                  No change…

                  E 1 Reply Last reply May 26, 2020, 7:50 PM Reply Quote 0
                  • E
                    Ekopalypse @Vin dickator
                    last edited by May 26, 2020, 7:50 PM

                    @Vin-dickator
                    is there a new error in the console?

                    V 1 Reply Last reply May 26, 2020, 7:52 PM Reply Quote 1
                    • V
                      Vin dickator @Ekopalypse
                      last edited by May 26, 2020, 7:52 PM

                      @Ekopalypse

                      So, this time it says

                      Python 2.7.6-notepad++ r2 (default, Apr 21 2014, 19:26:54) [MSC v.1600 32 bit (Intel)]
                      Initialisation took 32ms
                      Ready.
                      Traceback (most recent call last):
                        File "C:\K\OD\Stuff\Soft\Notepad++\plugins\PythonScript\scripts\EnhanceUDLLexer.py", line 260, in <module>
                          EnhanceUDLLexer().main()
                        File "C:\K\OD\Stuff\Soft\Notepad++\plugins\PythonScript\scripts\EnhanceUDLLexer.py", line 72, in __call__
                          cls._instance = super(SingletonEnhanceUDLLexer, cls).__call__(*args, **kwargs)
                        File "C:\K\OD\Stuff\Soft\Notepad++\plugins\PythonScript\scripts\EnhanceUDLLexer.py", line 100, in __init__
                          self.configure()
                        File "C:\K\OD\Stuff\Soft\Notepad++\plugins\PythonScript\scripts\EnhanceUDLLexer.py", line 180, in configure
                          editor1.indicSetFlags(0, SC_INDICFLAG_VALUEFORE)
                      AttributeError: 'Editor' object has no attribute 'indicSetFlags'
                      
                      
                      1 Reply Last reply Reply Quote 0
                      • E
                        Ekopalypse
                        last edited by May 26, 2020, 7:54 PM

                        That’s what I was afraid of.
                        Let me download 7.6.6 and PS 1.0.8.0 and see what needs to be changed. I don’t think I can finish this today but I promise
                        to report back tomorrow. Here we already have 10.pm

                        V 2 Replies Last reply May 26, 2020, 7:55 PM Reply Quote 2
                        • V
                          Vin dickator @Ekopalypse
                          last edited by May 26, 2020, 7:55 PM

                          @Ekopalypse I was about ask that :D

                          Please take your time,
                          21:55 now aswell

                          You have a nice dinner/good night :)

                          Thanks for your assistance so far

                          1 Reply Last reply Reply Quote 1
                          • V
                            Vin dickator @Ekopalypse
                            last edited by May 26, 2020, 8:20 PM

                            Let me download 7.6.6 and PS 1.0.8.0

                            This, got me thinking… I thought I was already using the latest version of PythonScript based on this URL …

                            But was I wrong :o
                            Pikachu.png

                            I found the more latest version on GitHub
                            Guess, they abandoned the version on sourceforge website

                            and after installing the latest one, the code highlighting works perfectly!

                            Thanks a lot for the help!

                            E 1 Reply Last reply May 26, 2020, 8:22 PM Reply Quote 2
                            • E
                              Ekopalypse @Vin dickator
                              last edited by Ekopalypse May 26, 2020, 8:24 PM May 26, 2020, 8:22 PM

                              @Vin-dickator

                              I hope you haven’t installed version 3… this is an alpha release.
                              The latest stable is https://github.com/bruderstein/PythonScript/releases/tag/v1.5.4

                              Version3 will be using Python3 and there is still some work
                              to be done to get it to the level 1.5.4 is.

                              V 1 Reply Last reply May 26, 2020, 8:26 PM Reply Quote 2
                              • V
                                Vin dickator @Ekopalypse
                                last edited by May 26, 2020, 8:26 PM

                                @Ekopalypse Yes, yes…
                                Understood, thanks for asking :D

                                Not using the alpha now …
                                I used the same one as yours 1.5.3

                                1 Reply Last reply Reply Quote 2
                                • E
                                  Ekopalypse
                                  last edited by May 26, 2020, 8:27 PM

                                  Now we can rest and go to bed :-D
                                  If there is anything about the script let us know here.

                                  Good night.

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