sg = peripheral.wrap("stargate_1") --stargate_1 is my example, you have to change it.
print("Enter Address:") --Use some text one screen.
address = read() --Read the input and saves it in address
sg.dial(address) -- Dial to the input
sleep(60) -- just an timer 
sg.disconnect() -- disconnect from the gate
shell.run("clear") -- to clear to screen
shell.run("startup") -- to restart "startup"
