** ? concerning CreateObject("Scripting.FileSystemObject") 
Author Message
 ** ? concerning CreateObject("Scripting.FileSystemObject")

Hi doe anyone know how to call the
CreateObject("Scripting.FileSystemObject")
other then in the primary scripting <%   %> of vb. In the following
example just below I'm trying to read a script file every 5 second ,
that works without the filesystemobject......Anyone know how to
achieve this..

<SCRIPT LANGUAGE="VBScript">

Const ForReading = 1
public x
Public Sub Gpwsm
        Const ForReading = 1
        Set fs = Server.CreateObject("Scripting.FileSystemObject")
        Set a = fs.OpenTextFile("c:\webshare\wwwroot\pwsm.txt",
ForReading, FALSE)
        RawData = a.Read(15)
        a.Close

        x = x + 1
        document.all.MyData.innerText = x & " -- " & time
        MyID = setTimeout ("Gpwsm", 5000)

End Sub
</script>

<body onLoad="Gpwsm()" background = "white">

<P ID="MyData"></P>

</body>

Thanks
Bandit



Sat, 21 Jun 2003 08:18:06 GMT  
 ** ? concerning CreateObject("Scripting.FileSystemObject")
PS
This is not a permmission problem, even with the runat server
but error's with need object error....were runing a scritp on the
server that recalls itself every15 seconds which redesplays the whole
page,  it would be much nicer to just update the fiels within the page

John

Quote:

>Hi doe anyone know how to call the
>CreateObject("Scripting.FileSystemObject")
>other then in the primary scripting <%   %> of vb. In the following
>example just below I'm trying to read a script file every 5 second ,
>that works without the filesystemobject......Anyone know how to
>achieve this..

><SCRIPT LANGUAGE="VBScript">

>Const ForReading = 1
>public x
>Public Sub Gpwsm
>    Const ForReading = 1
>    Set fs = Server.CreateObject("Scripting.FileSystemObject")
>    Set a = fs.OpenTextFile("c:\webshare\wwwroot\pwsm.txt",
>ForReading, FALSE)
>    RawData = a.Read(15)
>    a.Close

>    x = x + 1
>            document.all.MyData.innerText = x & " -- " & time
>    MyID = setTimeout ("Gpwsm", 5000)

>End Sub
></script>

><body onLoad="Gpwsm()" background = "white">

><P ID="MyData"></P>

></body>

>Thanks
>Bandit



Sat, 21 Jun 2003 08:51:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Replacing TDBControlGrid

2. MenuItem events:(

3. ** ? concerning CreateObject("Scripting.FileSystemObject")

4. CreateObject("Scripting.FileSystemObject") doesnt work

5. CreateObject("Scripting.FileSystemObject")

6. Set filesys = CreateObject("Scripting.FileSystemObject")

7. CreateObject("Scripting.FileSystemObject") Error

8. Set fs = CreateObject("Scripting.FileSystemObject")-error

9. CreateObject("Scripting.FileSystemObject") Error

10. Set fso = Server.CreateObject("Scripting.FileSystemObject")

11. Trouble with CreateObject("Scripting.FileSystemObject")

12. Server.CreateObject("Scripting.FileSystemObject")

 

 
Powered by phpBB® Forum Software