Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch Programming Questions  (Read 10105 times)

0 Members and 1 Guest are viewing this topic.

255.255.255.me

  • Guest
Batch Programming Questions
« on: January 23, 2006, 12:41:45 PM »
I am a beginning programmer and am attempting to create an invisible entry when using standard input as the input to set a variable.  

I need the question to display on screen and possibly the # sign to appear instead of the characters typed for the input.  

If you have a line of code for this, please reply with it or with suggestions.

Thank you

R0SS

  • Guest
Re: Batch Programming Questions
« Reply #1 on: January 23, 2006, 02:55:52 PM »
Posted in The wrong place.

try Programming section mate.

R0SS

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: Batch Programming Questions
« Reply #2 on: January 23, 2006, 03:42:49 PM »
Typed data is not taken from the command line and made available from the keyboard device until the enter key is pressed. Since you cannot read a single character as it is typed, there is no way to intercept the character and echo a # to the command line. Instead, you can only read complete lines.

You would need to write a front-end GUI for this.

Hope this helps. 8-)
« Last Edit: January 23, 2006, 04:50:09 PM by Sidewinder »
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

bdetchevery

  • Guest
Re: Batch Programming Questions
« Reply #3 on: January 31, 2006, 11:33:39 AM »
As was mentioned, there is no "built-in" batch file way to do this.

However, if you know a little .NET you can check/modify the article here

http://www.codeproject.com/dotnet/ConsolePasswordInput.asp

It will allow you to create a console app to do what I think u r looking for

lucofearl

  • Guest
Re: Batch Programming Questions
« Reply #4 on: February 16, 2006, 08:11:08 PM »
ross, this IS the programming page.

rockerest



    Hopeful
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: Batch Programming Questions
« Reply #5 on: February 19, 2006, 01:42:46 AM »
Quote
Posted in The wrong place.

try Programming section mate.

R0SS


This isn't the programming section?
In general, the PEBKAC.  Whether it's now or was three weeks ago, the PEBKAC.
Unsafe browsing and general computer / internet illiteracy IS the users problem.  Don't have sex if you don't know how to use a condom.
Also, there are 10 types of people in the world, those who understand binary, and those who don't.

rockerest



    Hopeful
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: Batch Programming Questions
« Reply #6 on: February 19, 2006, 01:49:14 AM »
jk, R0SS.......

Hey, I've got a quick question about batching, and I decided there' no point in starting a new thread since this one has a perfectly broad title.

I'm trying to make a batch file that'll open up, maximize the command prompt window to full screen and then simulate the old sending-you-scary-messages-one-letter-at-a-time thing.  One letter pops up, waits a half second, the second comes up, etc.

I'd also like it to be able to draw the message (no matter how long) from a text file.  I have a piece of code that was supposedly supposed to make the prompt pause, but it just tries to stop the program a lot of times (try running it, I'm not sure how to describe it):

TYPE NUL | test.bat /N /CY /TY,.5 >NUL

Anway, any help or links to easy-to-understand pages would be greatly appreciated.  (the reason I say easy-to-understand is because every batch tutorial or instruction page I've seen has started at about the intermediate level, rather than my beginner level.  I've been writing batch files for, oh, about 1.5 days now)

Thanks
-rock
In general, the PEBKAC.  Whether it's now or was three weeks ago, the PEBKAC.
Unsafe browsing and general computer / internet illiteracy IS the users problem.  Don't have sex if you don't know how to use a condom.
Also, there are 10 types of people in the world, those who understand binary, and those who don't.

rockerest



    Hopeful
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: Batch Programming Questions
« Reply #7 on: February 19, 2006, 03:16:36 AM »
OK, got my question answered on different forums, here's what I've got:

Code: [Select]
@echo off
cls
echo I
ping -n 1 -w 100 1.1>nul
cls
echo I
ping -n 1 -w 100 1.1>nul
cls
echo I K
ping -n 1 -w 100 1.1>nul
cls
echo I Kn
ping -n 1 -w 100 1.1>nul
cls
echo I Kno
ping -n 1 -w 100 1.1>nul
cls
echo I Know
ping -n 1 -w 100 1.1>nul
cls
echo I Know
ping -n 1 -w 100 1.1>nul
cls
echo I Know W
ping -n 1 -w 100 1.1>nul
cls
echo I Know Wh
ping -n 1 -w 100 1.1>nul
cls
echo I Know Whe
ping -n 1 -w 100 1.1>nul
cls
echo I Know Wher
ping -n 1 -w 100 1.1>nul
cls
echo I Know Where
ping -n 1 -w 100 1.1>nul
cls
echo I Know Where
ping -n 1 -w 100 1.1>nul
cls
echo I Know Where Y
ping -n 1 -w 100 1.1>nul
cls
echo I Know Where Yo
ping -n 1 -w 100 1.1>nul
cls
echo I Know Where You
ping -n 1 -w 100 1.1>nul
cls
echo I Know Where You
ping -n 1 -w 100 1.1>nul
cls
echo I Know Where You L
ping -n 1 -w 100 1.1>nul
cls
echo I Know Where You Li
ping -n 1 -w 100 1.1>nul
cls
echo I Know Where You Liv
ping -n 1 -w 100 1.1>nul
cls
echo I Know Where You Live
ping -n 1 -w 100 1.1>nul
ping -n 1 -w 1800 1.1>nul

Mwa ha ha......

Anyways, I have two more questions I'd like to ask, as well as a restatement of my previous question:
1)How can I create a batch file to call ANY text from a text file?  Would it be even remotely similar?
2)I'm not sure if this will be frowned upon, since it isn't a virus or anything, but I was wondering if there's a way to invisably attach this to an email and have it run once when opened?
3)This is probably the most important question, What is the code to force the batch file into full-screen mode as soon as it starts?

--thanks, and if #2 shouldn't be answered, don't worry about it....

-rock
« Last Edit: February 19, 2006, 03:16:59 AM by rockerest »
In general, the PEBKAC.  Whether it's now or was three weeks ago, the PEBKAC.
Unsafe browsing and general computer / internet illiteracy IS the users problem.  Don't have sex if you don't know how to use a condom.
Also, there are 10 types of people in the world, those who understand binary, and those who don't.