This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Hydrotronics's profile picture

Program referring to itself

Started by Hydrotronics, 14 November 2015 - 05:24 PM
Hydrotronics #1
Posted 14 November 2015 - 06:24 PM
Hello! I am here to ask how one would make a program refer to itself within a program. But make sure that it's a variable. The goal I wish to achieve is an installer which does it's job then deletes itself, no matter the name of the program
valithor #2
Posted 14 November 2015 - 06:34 PM
If the program was run using shell.run, then you can use shell.getRunningProgram, which returns the full path to the program.
Hydrotronics #3
Posted 14 November 2015 - 06:38 PM
Thank you!! I have never heard of that but I have figured out how to work it! Thanks!