d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Looking For Program That Does This :
Add Reply New Topic New Poll
Member
Posts: 4,968
Joined: May 25 2007
Gold: 2,262.00
Apr 20 2022 06:20pm
First of all, hello.

I have 21 files openable by notepad that I would like to edit (change a number) all at once, the edit would be located at the same line in each files.
The problem is each files require its own number (I can't do a basic ctrl+G). But in another hand the value of first file is correlated with the value of the second file, the 3rd, the 4th etc...

What can I use/do to only edit the first (or give a root number) so every files autoedit?



root number = X
Numbre on the file 1 = [(X+7)*2]+0
Numbre on the file 2 = (X+7)*3]+1
Numbre on the file 3 = (X+7)*4]+1
Numbre on the file 4 = (X+7)*5]+2
Numbre on the file 5 = (X+7)*6]+2
Numbre on the file 6 = (X+7)*7]+3
Numbre on the file 7 = (X+7)*8]+3
Numbre on the file 8 = (X+7)*9]+4
Numbre on the file 9 = (X+7)*10]+4
Numbre on the file 10 = (X+7)*10]+5
...
Numbre of the file 21 = (X+7)*21]+10

Thank you a lot.

This post was edited by Germain on Apr 20 2022 06:21pm
Member
Posts: 3,175
Joined: Aug 29 2011
Gold: 616.00
Apr 21 2022 01:01am
For one, this is super easy to solve.

For two, your question seems like you're just looking for an answer to a homework assignment. At least post your codepen or whatever of your attempt at solving it. Put in the work. Don't just ask people to solve your problems for free
Member
Posts: 4,968
Joined: May 25 2007
Gold: 2,262.00
Apr 21 2022 10:00am
Quote (KronikSmoker @ 21 Apr 2022 09:01)
For one, this is super easy to solve.

For two, your question seems like you're just looking for an answer to a homework assignment. At least post your codepen or whatever of your attempt at solving it. Put in the work. Don't just ask people to solve your problems for free



Please @KronikSmoker stop being condescending and refrain from commenting if you didn't read the thread. :huh:


It's not a homework, everything is already solved. My question is what can I use to automate the edits on the notepad files, without having to change them by hand.


The answer would be simple as: "use this tool/program".
Member
Posts: 3,175
Joined: Aug 29 2011
Gold: 616.00
Apr 21 2022 03:04pm
Quote (Germain @ Apr 21 2022 09:00am)
Please @KronikSmoker stop being condescending and refrain from commenting if you didn't read the thread. :huh:


It's not a homework, everything is already solved. My question is what can I use to automate the edits on the notepad files, without having to change them by hand.


The answer would be simple as: "use this tool/program".


Similar problems are very common early cs homework assignments. Also you posted this in the Programmer's section. This is the wrong area section to ask a non-programming related question.
Member
Posts: 18
Joined: Apr 21 2022
Gold: 1.74
Apr 22 2022 01:35pm
so its the same number your replacing everywhere or just that position that is being replaced?
Member
Posts: 4,968
Joined: May 25 2007
Gold: 2,262.00
Apr 22 2022 03:43pm
Quote (Firif @ 22 Apr 2022 21:35)
so its the same number your replacing everywhere or just that position that is being replaced?


Sadly, it is not the same number i'm replacing everywhere (so I can't use CTRL+G / replace in all open tabs). However, the number being replaced in 1st file is 2 times smaller than the number in the 2nd file, 3 times smaller than the number in the 3rd file ... and 21 times smaller than the one in the 21st file.
So the numbers aren't the same, but they are linked/correlated.



Quote (KronikSmoker @ 21 Apr 2022 23:04)
Similar problems are very common early cs homework assignments. Also you posted this in the Programmer's section. This is the wrong area section to ask a non-programming related question.


Read the last sentence of the post you quoted, thanks.
Member
Posts: 22,458
Joined: Dec 6 2008
Gold: 14.00
Trader: Trusted
Apr 22 2022 06:45pm
do the files need to be open? you could run a python script to do this pretty easily
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll