Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. -- startup --
  2. -- default program --
  3. PROGRAM='Mine'
  4. POSOTION=1
  5.  
  6. -- settings --
  7. if fs.exists('settings/last') then
  8. fh=io.open('settings/last')
  9. PROGRAM=fh:read()
  10. POSITION=fh:read()
  11. fh:close()
  12. else
  13. fh=io.open('settings/last', 'w')
  14. fh:write(PROGRAM..'\n')
  15. fh:write(POSITION..'\n')
  16. fh:close()
  17. end
  18.  
  19. print(PROGRAM)
  20. print(POSITION)
  21.  
  22. shell.run(PROGRAM, tonumber(POSITION))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement