Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Start the multishell environment
- local shell1 = shell.openShell() -- Open first shell
- local shell2 = shell.openShell() -- Open second shell
- -- Set up modems to communicate with both monitors
- local modem1 = peripheral.wrap("top") -- Replace "top" with the modem's side for monitor 1
- local modem2 = peripheral.wrap("bottom") -- Replace "bottom" with the modem's side for monitor 2
- -- Function to display gate on both monitors
- local function displayOnBothMonitors()
- -- Assuming that "gate" is a script that handles its own display
- local command = "gate"
- -- Run gate program on both shells
- shell.run(command, shell1)
- shell.run(command, shell2)
- -- Now, send the output to both monitors
- modem1.transmit(1, 1, "Running gate on monitor 1")
- modem2.transmit(1, 1, "Running gate on monitor 2")
- end
- -- Call the function to start displaying on both monitors
- displayOnBothMonitors()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement