• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

little problem

Joined
Jul 15, 2007
Messages
216 (0.03/day)
System Name Monsta AMD
Processor FX-8120@4.3@1.4v
Motherboard Gigabye 990fx ud3 rev 4.0
Cooling custom XSPC EX360
Memory 8Gb Kingston Fury ddr3 1600@1920
Video Card(s) GTX 980
Storage Kingston ssd Now V3, Seagate barracuda 1 TBx3
Display(s) AOC 24" full HD
Case In Win Android
Audio Device(s) integrated
Power Supply evga supernova nex 750g
Mouse CM Storm
Keyboard iRocks
Software win 8.1 X64
hi guys im trying to make a little script but I'm having trouble with certain part the output of information to a simply text file

this is the function that I'm having trouble

startnum = 1000000000
endnum = 9999999999
incnum = 1
Const ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("E:\list.txt",ForAppending)

Do until startnum <= endnum
objFile.WriteLine startnum
objFile.Close
startnum = startnum + incnum

Loop
 
Dim objFile As System.IO.StreamWriter = New System.IO.StreamWriter("e:\list.txt", true)
objFile.Write(startnum)
objFile.Close()

That works in vb.net, you should be able to translate that.
 
Startnum and endnum must be a 64-bit integer (aka long). If it isn't, there's one of your problems.

Secondly, that is a LOT of data to be writing. Maybe reduce the numbers...

Thirdly, what is the error?
 
ok writing the output is fixed but the recurring error now is the loop, it will simply not loop
 
ok writing the output is fixed but the recurring error now is the loop, it will simply not loop
It's probably because it would take several minutes to reach that large of a number depending on your processor speed. It takes 8 x 1.6 GHz processors about 10 seconds to count to 1 billion. Do 1 to 99 or something like that for a quick test run.
 
Back
Top