Ease values in-between range



  • 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



  • PS, I’m new to notepad++



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



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



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



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


Log in to reply