Jump to content


Command Prompt


6 replies to this topic

#1 Numbers

    Regular

  • Member
  • 167 posts

Posted 29 January 2009 - 05:42

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
Posted Image
EXTREME Tree is to EXTREME for you.

#2 Prophet of the Pimps

    Masters of Booty Strike Force

  • Gold Member
  • 11369 posts
  • Projects: ShockWave

Posted 29 January 2009 - 07:40

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.
Never underestimate a Resourceful Idiot
Posted Image

#3 Numbers

    Regular

  • Member
  • 167 posts

Posted 29 January 2009 - 09:19

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?
Posted Image
EXTREME Tree is to EXTREME for you.

#4 ΓΛPTΘΓ

    Ecchi Toaster

  • Project Team
  • 923 posts
  • Projects: Spam

Posted 29 January 2009 - 09:48

Iirc on vista, telnet needed to be installed separately.
Posted Image
Posted Image

Awesome radio

Quote

19:44 - Chyros: I'm very harmless

#5 CodeCat

    It's a trap!

  • Gold Member
  • 6111 posts

Posted 29 January 2009 - 13:42

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.
CodeCat

Posted Image
Posted Image

Go dtiomsaítear do chód gan earráidí, is go gcríochnaítear do chláir go réidh. -Old Irish proverb

#6 Numbers

    Regular

  • Member
  • 167 posts

Posted 30 January 2009 - 22:53

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
Posted Image
EXTREME Tree is to EXTREME for you.

#7 Alias

    Member Title Goes Here

  • Member
  • 11705 posts

Posted 30 January 2009 - 23:08

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

Posted Image



4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users