Community
    • Login

    Ease values in-between range

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 3 Posters 392 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.
    • Andrew WardleA
      Andrew Wardle
      last edited by

      Hi
      You can see there are two “MouseMove” commands with the first one’s values (x=0;y=0) and the seconds one’s value’s are (x=-24;y=36)
      Is the a way to efficiently add more lines easing in from 0 to -24, for example there would be another command in the middle with values (-12:18)
      Thanks
      MouseMoveEvent.PNG

      1 Reply Last reply Reply Quote 0
      • Andrew WardleA
        Andrew Wardle
        last edited by

        PS, I’m new to notepad++

        EkopalypseE 1 Reply Last reply Reply Quote 0
        • Terry RT
          Terry R
          last edited by

          @Andrew-Wardle said in Ease values in-between range:

          Is the a way to efficiently add more lines easing in from 0 to -24

          I think you are hoping that a regular expression (regex) would read the 24 and the 0, then find a “middle” number and produce another set of intermediate instructions. A regex cannot perform mathematical calculations, so for any high number and any low number it cannot calculate a middle number.

          However all is not lost, as Notepad++ also supports other programming languages and also plugins. PythonScript is a well supported language (and well used by Notepad++ users), but it would require learning it to do your task or relying on someone within this forum to produce a program for you.

          Terry

          1 Reply Last reply Reply Quote 1
          • EkopalypseE
            Ekopalypse @Andrew Wardle
            last edited by

            @Andrew-Wardle

            In this particular situation I would do the following,
            note, assuming you have xml tools plugin installed and that
            delay tag as well as type tag keep their values.

            1. copy the block into e new buffer
            <MouseMovement>
            	<Type>3</Type>
            	<x>0</x>
            	<y>0</y>
            	<Delay>7</Delay>
            </MouseMovement>
            
            1. goto plugins->xml tools->linearize xml
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            
            1. press ctrl+d as many times as you want it to be replicated
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            <MouseMovement><Type>3</Type><x>0</x><y>0</y><Delay>7</Delay></MouseMovement>
            
            1. put the caret after <x> and press and hold SHIFT+ALT and use down arrow key to create a rectangular selection
            2. press the del key to get rid of the initial value
            3. start column editor (menu edit->column editor) and set your start end end number. (you can’t set negative values) press enter.
            4. repeat the step for y value
            5. Create another rectangular selection and add the minus sign
            6. goto plugins->xml tools->pretty print … with line breaks

            Sounds alot of steps but is done within seconds.

            Andrew WardleA 2 Replies Last reply Reply Quote 6
            • Andrew WardleA
              Andrew Wardle @Ekopalypse
              last edited by

              @Ekopalypse Thank you ! this helps alot, I’ll try this out tonight :)

              1 Reply Last reply Reply Quote 1
              • Andrew WardleA
                Andrew Wardle @Ekopalypse
                last edited by

                @Ekopalypse Just got done trying it out, works wonderfully, many thanks :)

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