• Login
Community
  • Login

Ease values in-between range

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
6 Posts 3 Posters 400 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.
  • A
    Andrew Wardle
    last edited by Oct 21, 2020, 12:39 AM

    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
    • A
      Andrew Wardle
      last edited by Oct 21, 2020, 12:41 AM

      PS, I’m new to notepad++

      E 1 Reply Last reply Oct 21, 2020, 10:33 AM Reply Quote 0
      • T
        Terry R
        last edited by Oct 21, 2020, 1:00 AM

        @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
        • E
          Ekopalypse @Andrew Wardle
          last edited by Oct 21, 2020, 10:33 AM

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

          A 2 Replies Last reply Oct 21, 2020, 1:10 PM Reply Quote 6
          • A
            Andrew Wardle @Ekopalypse
            last edited by Oct 21, 2020, 1:10 PM

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

            1 Reply Last reply Reply Quote 1
            • A
              Andrew Wardle @Ekopalypse
              last edited by Oct 21, 2020, 7:58 PM

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

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