←  Code Block

Fallout Studios Forums

»

Command Prompt

Numbers's Photo Numbers 29 Jan 2009

Right so here is my question. How do I make one Command prompt enter code into a different command prompt window. Preferably via batch file. and for explanation sake we will call them

1.bat and 2.bat

[phase1] 1.bat opens 2.bat

[phase2] 2.bat enters code into 1.bat

I got phase 1 complete. but phase 2.....
How is this done? |8
Quote

Prophet of the Pimps's Photo Prophet of the Pimps 29 Jan 2009

http://www.tldp.org/...edirection.html

Best i could suggest is to output the value to a text file and then make the second batch read the text file.
Quote

Numbers's Photo Numbers 29 Jan 2009

Hum can that be done? I'm sorry I should be more clear.

@echo off
start 2.bat
telnet randomaddress

Problem is after telnet runs bat no longer works. Which I was hoping 2.bat can come in. To fill in information that is required. Via type it for me. Make it fast you know?
Quote

ΓΛPTΘΓ's Photo ΓΛPTΘΓ 29 Jan 2009

Iirc on vista, telnet needed to be installed separately.
Quote

CodeCat's Photo CodeCat 29 Jan 2009

View PostProphet of the Pimps, on 29 Jan 2009, 8:40, said:

http://www.tldp.org/...edirection.html

Best i could suggest is to output the value to a text file and then make the second batch read the text file.

Using a pipe takes out the middle man.

program1 | program2

This uses the output from program1 as input for program2.
Quote

Numbers's Photo Numbers 30 Jan 2009

Hey Sweet the code works but It's not working like I need it to. Now I'm getting a different problem. It's looping
Quote

Alias's Photo Alias 30 Jan 2009

Hmm, can you post your code (or at least the endmost part of both)?
Quote