alcool9999
Technical User
Hi
Code:
main()
Sub main()
Set FS = CreateObject("Scripting.FileSystemObject")
Set a = Fs.OpenTextFile("C:\Documents and Settings\Alex\desktop\create.txt",2,true)
a.write("hello")
a.close
End Sub
Set FS = CreateObject("Scripting.FileSystemObject")
if Fs.FileExists("C:\Documents and Settings\Alex\desktop\stop.txt") then
else
main()
End if
I need a sort of loop using a sub. It is supposed to kepp going back to the sub untiil the file stop.txt appears but it only goes through the sub twice and i don't know why? by the way the bit inside main() is just so i know that its still going.
Thanks
Code:
main()
Sub main()
Set FS = CreateObject("Scripting.FileSystemObject")
Set a = Fs.OpenTextFile("C:\Documents and Settings\Alex\desktop\create.txt",2,true)
a.write("hello")
a.close
End Sub
Set FS = CreateObject("Scripting.FileSystemObject")
if Fs.FileExists("C:\Documents and Settings\Alex\desktop\stop.txt") then
else
main()
End if
I need a sort of loop using a sub. It is supposed to kepp going back to the sub untiil the file stop.txt appears but it only goes through the sub twice and i don't know why? by the way the bit inside main() is just so i know that its still going.
Thanks