Getting input in Console mode 
Author Message
 Getting input in Console mode

How do I get input in console mode, and not popup the Windows input box?


Fri, 11 May 2001 03:00:00 GMT  
 Getting input in Console mode

Quote:

> How do I get input in console mode, and not popup the Windows input box?

Try something like this ...

' Console.vbs - A script to demonstrate input from the CON
'                device under cscript.exe ONLY.
' Syntax: cscript//nologo Console.vbs

'             http://www.pressroom.com/~tglbatch/
Dim Test
WScript.Echo "Console input test"
Test = ConsoleInput("Enter text here: ")
WScript.Echo chr(34) & Test & chr(34)

Function ConsoleInput(Prompt)
  Const ForReading = 1, ForWriting = 2
  Dim objFS, objF
  Set objFS = CreateObject("Scripting.FileSystemObject")
  Set objF = objFS.OpenTextFile("CON", ForWriting)
  objF.Write Prompt
  Set objF = objFS.OpenTextFile("CON", ForReading)
  ConsoleInput =  objF.ReadLine
End Function

Tom Lavedas
-----------
http://www.pressroom.com/~tglbatch/



Sun, 13 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting Input Console

2. Runing console mode aplications

3. software postscript to change input mode of laserwriter IINT

4. running console app in same console

5. Getting Ghostscript to run in 24 bit mode

6. getting user input on a form

7. getting input to PostScript program

8. Getting keyboard input

9. Getting/setting character position in an input field

10. Getting Input

11. Getting keyboard input

12. Input buttons getting enabled

 

 
Powered by phpBB® Forum Software