Scrolling
Posted: Sat Dec 15, 2007 12:19 pm
Ok, when i use the command prompt to print stuff in qbasic, how would i beable to scroll through it? use VIEW? I dunno. I cant even guess on how to put the results in an array
Discuss QBasic, Freebasic, QB64 and more
http://www.petesqbsite.com/phpBB3/
I am unable to determine what you want.Lee wrote:Ok, when i use the command prompt to print stuff in qbasic, how would i beable to scroll through it? use VIEW? I dunno. I cant even guess on how to put the results in an array :?
Code: Select all
SCREEN 13
RESTORE Fire
DIM FireDrawing (0 TO 32) AS INTEGER
FOR PY = 0 TO 5
FOR PX = 0 TO 5
READ A
PSET (PX, PY), A
NEXT PX
NEXT PY
GET (0,0)-(5,5), FireDrawing
PUT (20, 20), FireDrawing
Fire:
DATA 00,00,04,04,00,00
DATA 00,04,14,14,04,00
DATA 00,04,14,14,04,00
DATA 04,14,14,14,14,04
DATA 04,14,14,14,14,04
DATA 04,14,14,14,14,04
DATA 04,04,04,04,04,04
Code: Select all
Stuff$ = (Whatever you are searching for)
File$ = (Wherever you are searching. perhaps *.doc ?)
cmd$ = "FIND /I " + CHR$(34) + Stuff$ + CHR$(34) + " " + File$
PRINT cmd$
OPEN "MyFile.bat" FOR OUTPUT AS #1
PRINT #1, cmd$ + ">MyFile.txt"
CLOSE
SHELL "MyFile.bat"
PRINT "Here is the stuff you can scroll as you please"
OPEN "MyFile.txt" FOR INPUT AS #1
WHILE NOT EOF(1): LINE INPUT #1, l$: PRINT l$: WEND
CLOSE
SYSTEM
??? What's there to explain ???Lee wrote:Can you please explain the code?
Code: Select all
FIND /I "z3" *.bas >MyFile.txt
Ignore that, Lee. DOSKEY is a utility that stores recent commands you made at the DOS prompt so you don't have to type them again, but just use up-arrow to get to old commands, etc.Seb McClouth wrote:Or use DOSKEY
I suggest starting a new thread with this question. Title "How to draw using DRAW command"Lee wrote:but another question is how do i put variables in the DRAW command?