Advertisement
Guest User

search

a guest
Jan 24th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local sVars = {...}
  2. if #sVars == 0 then
  3. shell.run("clear")
  4. shell.run("restore")
  5. shell.run("clear")
  6. write("Keyword:")
  7. sKey = read()
  8. else
  9. sKey = sVars[1]
  10. for i = 2,#sVars do
  11. sKey = sKey.." "..sVars[i]
  12. end
  13.  
  14. end
  15. a = fs.open("results.txt","w")
  16. a.close()
  17.  
  18. tChat = file.readLines("chat1.log")
  19. print(#tChat)
  20. tResults = file.Search(tChat,sKey)
  21. print(#tResults)
  22. file.writeLines(tResults,"results.txt")
  23. shell.run("edit","results.txt")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement