Jump to content




[LUA] [Question] editing a program to be the startup of a PC


13 replies to this topic

#1 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 04 October 2012 - 03:39 PM

How do I edit the startup of certain computer ID's? Because stopping the server resets the computer and the code on the computer has to be typed in again to begin.

#2 sabian8

  • New Members
  • 51 posts
  • LocationEngland

Posted 04 October 2012 - 03:41 PM

rename the program to startup

#3 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 04 October 2012 - 04:08 PM

View Postsabian8, on 04 October 2012 - 03:41 PM, said:

rename the program to startup

I forgot to mention I have many codes for many different computers so not all of them can be named startup

#4 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 04 October 2012 - 04:25 PM

View Postsidekick_, on 04 October 2012 - 04:08 PM, said:

View Postsabian8, on 04 October 2012 - 03:41 PM, said:

rename the program to startup

I forgot to mention I have many codes for many different computers so not all of them can be named startup
Yes they can. Just make the file in the computer root, not in the rom.

#5 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 04 October 2012 - 05:31 PM

Hmm, I'm not quite understanding how to do this... which folder must i Put the codes in?

#6 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 04 October 2012 - 05:52 PM

In the world/computer/<computer id> directory. In-game, in the root directory (inside of no folder).
Do:
> edit startup
and then write the code.

#7 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 04 October 2012 - 07:34 PM

View PostMysticT, on 04 October 2012 - 05:52 PM, said:

In the world/computer/<computer id> directory. In-game, in the root directory (inside of no folder).
Do:
> edit startup
and then write the code.

Yes i know about that but is there no way else to make a code the startup of a computer without having to do this? My codes have 60+ lines. To type all that is just a mission.

#8 faubiguy

  • Members
  • 213 posts

Posted 04 October 2012 - 07:38 PM

Save the file for the code as startup in .minecraft/saves/world_name/computer/ID/ where id is the id of the computer.

#9 sjele

  • Members
  • 334 posts
  • LocationSomewhere on the planet called earth

Posted 04 October 2012 - 07:43 PM

Remember to have no extensions. Normal text docs have the the extensions .txt. If it has one you need to run the program with the extensions (startup.txt).

If you have one, use google to find out how to remove it

#10 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 04 October 2012 - 08:23 PM

View Postfaubiguy, on 04 October 2012 - 07:38 PM, said:

Save the file for the code as startup in .minecraft/saves/world_name/computer/ID/ where id is the id of the computer.

Hmm, weird. I did try that before you posted it because I saw someone else do it in a video on youtube - but it didnt work for me. Could it be because its multiplayer server maybe?

#11 Fatal_Exception

  • New Members
  • 105 posts

Posted 04 October 2012 - 10:17 PM

Yes, that only works for singleplayer, because programs are stored on the server.in multiplayer.

If you've already written your programs and they're already on the computers, you can just rename the files.

move <oldfile> <newfile>
at the command line.

#12 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 04 October 2012 - 11:18 PM

Is it not possible to edit startup on the computer and make it run the file I need it to?

#13 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 04 October 2012 - 11:19 PM

View Postsidekick_, on 04 October 2012 - 11:18 PM, said:

Is it not possible to edit startup on the computer and make it run the file I need it to?
Yes it is. Use:
shell.run("<program name>")

But again, you can just rename the file and it would work.

#14 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 05 October 2012 - 12:47 AM

View PostMysticT, on 04 October 2012 - 11:19 PM, said:

View Postsidekick_, on 04 October 2012 - 11:18 PM, said:

Is it not possible to edit startup on the computer and make it run the file I need it to?
Yes it is. Use:
shell.run("<program name>")

Thank you! Thats what i needed :(/>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users