Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Macro, automatically adding one to a value

I have a problem with macro in notepad++

Just needs to have value automatically changed to +1 (from current value)

So the values should be like this 1000, 1001, 1002, 1003 and so on for the coming values between the MEDIA_ID tags..

      <MEDIA>
      <MEDIA_ID>1000</MEDIA_ID>
      </MEDIA>
      <MEDIA>
      <MEDIA_ID>1001</MEDIA_ID>
      </MEDIA>

I have no idea how do this..

Could anyone help?

Thanks

like image 846
user1067455 Avatar asked Nov 27 '11 00:11

user1067455


1 Answers

1) Generate the list of numbers from 1000 to the number you want using excel and copy this into notepad++.

2) Go to the start of the file.

3) Start the macro recorder.

4) type <MEDIA>(down arrow)(HOME button)<MEDIA_ID>(END button)</MEDIA>(down arrow)(HOME button)</MEDIA>(down arrow)(HOME button)

5) repeat this macro as many times as needed.

like image 132
Pradeep Vairamani Avatar answered Oct 04 '22 18:10

Pradeep Vairamani