Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getProcs = function()
- prog = get_shell.host_computer.show_procs.split("\n")[1:]
- names = []
- for line in prog
- names.push(line.split(" ")[-1])
- end for
- return names
- end function
- comp = get_shell.host_computer
- comp.touch(current_path, "procs.txt")
- procs_file = comp.File(current_path + "/procs.txt")
- last_procs = getProcs()
- unique_progs = []
- while true
- procs = getProcs()
- if procs != last_procs then
- for name in procs
- if unique_progs.indexOf(name) == null then
- unique_progs.push(name)
- procs_file.set_content(unique_progs.join("\n"))
- end if
- end for
- print("Change!")
- end if
- last_procs = procs
- end while
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement