6 posts
Posted 06 September 2012 - 05:56 PM
My Question is simple: How do i change the code of program b, by starting program a? Is this possible?
1688 posts
Location
'MURICA
Posted 06 September 2012 - 06:08 PM
Pretty sure you can use the fs library to write and append words to other files, a.k.a. programs.
I don't think you can rewrite default programs though, however you can make local copies of them.
6 posts
Posted 06 September 2012 - 06:11 PM
So with the fs library i can change a print message in program X by starting program Y/giving an instruction in program Y?
351 posts
Posted 06 September 2012 - 07:48 PM
You can read in a file, edit it using the string library, and then write it back, so yes.
It is not very easy though, and yeah, it won't really work with the default programs (unless you mess around with the path and stuff, which is a pain).
6 posts
Posted 07 September 2012 - 09:36 AM
Nope, i start a custom Program to edit a custom program so it has to work. Ill try it soon
53 posts
Location
London, UK
Posted 07 September 2012 - 01:20 PM
Out of interest, why do you need to change part of another program?
If you wanted to change the password in a code for security software, the password could be saved as a file using the fs API. This means that one program can edit the password file, and the security software can open the file to find out what the password is, even if it has been changed by the first piece of software.
I hope I made that clear enough…