Comments in Macros

Comments in Macros

112
Power UserPower User
112

    May 20, 2005#1

    Is there any way to insert comments in macros?

    Cheerz,
    Paolo
    There is no such thing as an inconsistently correct system...
    Therefore, aim for consistency; in the expectation of reaching correctness!

    6,675585
    Grand MasterGrand Master
    6,675585

      May 20, 2005#2

      I'm afraid not!
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        May 20, 2005#3

        I sent a request on this topic to the support team a few months ago.
        Also a way to add a comment to the name, that is visible when scrolling the 'play any/multiple times...' Alt-M listbox, or a block of text at the beginning, displaying e.g. the prerequisites given by the programmer, to avoid starting it at the wrong place, or without doing the necessary preparations.

        206
        MasterMaster
        206

          May 20, 2005#4

          A real klutzy method is to use Find "comment text" in your macro


          Find "comment .... start of loop to do something"
          Find "comment .... end of loop to do something"


          Since nothing will be found, the macro will carry on, if you have checked the "Continue if a Find with Replace not found" option when you created the macro.

          The format doesn't matter as long as the comment text can't possibly exist in your text file.

          You can use as many of these as you want.

          Not great, but better than nothing until the real thing comes along.
          Software For Metalworking
          http://closetolerancesoftware.com

          48
          Basic UserBasic User
          48

            May 20, 2005#5

            I wonder when IDM will implement a true scripting feature in UltraEdit.

            112
            Power UserPower User
            112

              May 20, 2005#6

              Inray wrote:I wonder when IDM will implement a true scripting feature in UltraEdit.
              That would be good, although what's already there is pretty powerful. If they go the full language way, they need to preserve the recording ability - say the way Word and Excel do it.

              Paolo
              There is no such thing as an inconsistently correct system...
              Therefore, aim for consistency; in the expectation of reaching correctness!

              206
              MasterMaster
              206

                May 20, 2005#7

                This is only an opinion, but I think what we have is not perfect, but almost good enough. I do occasionally suffer from the lack of simple math, nested loops, good regex, and comments.

                The nice thing about the UE macro language is that you can do a tremendous amount without really knowing any programming. The syntax and functions are specific to text editing, and are very easy to understand.

                The last time I recorded a simple macro in Word, I got about three pages of code, 90% of it unnecessary.
                Software For Metalworking
                http://closetolerancesoftware.com

                112
                Power UserPower User
                112

                  May 21, 2005#8

                  mrainey56 wrote:This is only an opinion, but I think what we have is not perfect, but almost good enough. I do occasionally suffer from the lack of simple math, nested loops, good RegEx, and comments.
                  I agree it's pretty good. But as you say, it could be better (in some places)
                  The nice thing about the UE macro language is that you can do a tremendous amount without really knowing any programming. The syntax and functions are specific to text editing, and are very easy to understand.
                  Yes. This is so. But as I hinted previously, one of the best part is that it records so you can get a head start on writing the "production" macro.
                  The last time I recorded a simple macro in Word, I got about three pages of code, 90% of it unnecessary.
                  Agreed (well, perhaps I record smarter macros, only about 50% of mine are unnecessary :lol: ) . But it's the recording bit that helps you find the "gold" amongst all that dross - when you can't figure how to do something... I'll let Word tell me!

                  SO, my message is.... Don't go to anything fancier - without retaining the ability to record...

                  Paolo
                  There is no such thing as an inconsistently correct system...
                  Therefore, aim for consistency; in the expectation of reaching correctness!

                  48
                  Basic UserBasic User
                  48

                    May 21, 2005#9

                    PaoloFCantoni wrote:SO, my message is.... Don't go to anything fancier - without retaining the ability to record...Paolo
                    I have to agree with that. Recording actions in a macro is very useful.
                    Coding wise, simple but necessary things like nested loops, comments, regex, message box handling, etc. could be easily implemented into UE's current macro interpreter.

                    Stephen_Hatton
                    Stephen_Hatton

                      Jun 15, 2005#10

                      Hi All

                      I agree with your posts. I also have nudged IDM with suggestions for the macro improvements like:
                      1. Remarks
                      2. Pure text macro files (so that one can have a macro create a macro script).
                      3. Full access to all the menu items.
                      4. Comprehensive batch search and replace.


                      "A real klutzy method is to use Find "comment text" in your macro
                      Find "comment .... start of loop to do something" "

                      Thanks mrainey56 - the method you gave is a good interim solution for commenting / remarks in macros.

                      I use the "Top" command to separate sections of macro code.

                      Regards
                      Ing. Stephen Hatton
                      :idea: