CreateTextFile Method is basic fails to create file at specified path -


i using basic first time automate lecroy oscilloscope. following examples provided them attempting create program uses oscilloscope features , prints measured values file.

the oscilloscope specific features appear function correctly file creation code not create file @ specified path.

private sub makefile()      fso = createobject("scripting.filesystemobject")     myfile = fso.createtextfile("e:\test.txt")  end sub 

when run script produces nothing. haven't used basic before , naively seems should, bare minimum, create file @ path specified. seems compared examples provided lecroy.

i use method examples provided make use of:

on error resume next  set fso = createobject("scripting.filesystemobject") set myfile = fso.opentextfile("d:\hardcopy\logfile.txt", 8, true) 

also basis of oscilloscope windows 7 pc , claim both basic , additional methods work within system.

i don't know if me being unable basic or if there nuance missing. alternatively there may way implement within lecroy system different this.

if can verify if work if straight basic or if know programming lecroy 'scope, how go file creation on one, since isn't working.

thanks!

why aren't using streamreader , streamwriter?

dim writer new streamwriter("e:\test.txt") writer.write("") 

and streamreader:

dim reader new streamreader("d:\hardcopy\logfile.txt") dim text string = reader.readtoend 

you may need import system.io


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -