Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I create a txt file in QB?
#1
:bounce:

Hello I want to learn scripts in QB to create a *.txt file....

:roll:
Reply
#2
Code:
dim as integer ff
dim as integer i

ff = freefile

open "test.txt" for output as #ff

  for i = 0 to 19
    print #ff, i

  next

close #ff
Reply
#3
Do you want to make the txt file while running the program? Edit it there? In that case, use shell.

Code:
SHELL"EDIT yo.txt" 'makes a txt file named yo in default directory.
                             'Opens MS-DOS text edit application.

SHELL"SHELL D:/files/yo.txt" 'specifies where to put file and opens
                                          'MS-DOS text edit applicatoin.
-yah
Reply
#4
Quote:
Code:
dim as integer ff
dim as integer i

[b]ff = freefile[/b]

open "test.txt" for output as #ff

  for i = 0 to 19
    print #ff, i

  next

close #ff

Uh... I'm pretty sure that is an FB command there.
quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Reply
#5
torahteen, i'm pretty sure you're on crack for questioning me without even checking
Reply
#6
http://qbasicnews.com/qboho/qckfreefile.shtml
Reply
#7
Pwnd. :wtnod:
ovaProgramming.

One night I had a dream where I was breaking balls. The next morning, BALLSBREAKER was born.

Quote: Excellent. Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
Reply
#8
Quote:
Code:
dim as integer ff
dim as integer i

Unable to check it out, but does QB eat this? I believe it's:

Code:
dim ff as integer
etc...
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#9
youre right! i even seperated them, but reversed the syntax... damn qb... that syntax's just one of the thousands of reasons why fb pwns it
Reply
#10
Most agreed Tongue Confusedtar:
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)