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

shell.run() with variables

Started by ClassicRockFan, 21 January 2014 - 01:21 AM
ClassicRockFan #1
Posted 21 January 2014 - 02:21 AM
Hey guys, I am trying to write a GUI and have hit a snag. From within GUI, I want to be able to press a button (on an advanced computer) and be prompted to enter a file name. I want it to then take you to the code for the file that the user input (or create the new file). Heres the link for the pastebin of my idea for this. http://pastebin.com/e4fRbtWh Thanks all! :)/>
Lyqyd #2
Posted 21 January 2014 - 10:16 AM
You had the assignment backwards on line 2. You can use either of these:


shell.run("edit "..(...))

--# or this:

shell.run("edit ", (...))

Obviously, you can replace the `(…)` with a variable if you don't want to directly use the first argument.
ClassicRockFan #3
Posted 26 January 2014 - 05:11 PM
Thank you very much. It worked perfectly.