This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > VRML > October 2005 > create logfile
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| chtorner 2005-10-16, 6:23 pm |
| hai,
i need to create a logfile (txt,xls, clipboard or wathever) of user's
activity in a world like camera info, actions, traveling speed, restin
time at a position - this all with a timestamp.
but i don't know how to do.
do you?
| |
|
| chtorner a pensé très fort :
> hai,
> i need to create a logfile (txt,xls, clipboard or wathever) of user's
> activity in a world like camera info, actions, traveling speed, restin
> time at a position - this all with a timestamp.
> but i don't know how to do.
> do you?
First you need to get your log, which will have been generated by a
vrml Script node, and placed in a field.
log = VRML.getNodeEventOut("MyScript", "MyLog");
Do you want to write it in a local file ? It will be difficult, for
security reasons ... But it's possible, using the FileSystemObject of
Internet Explorer :
<embed id=VRML ...>
<script>
fso = new ActiveXObject("Scripting.FileSystemObject");
f1 = fso.CreateTextFile("c:\\windows\\bureau\\testfile.txt", true);
log = VRML.getNodeEventOut("MyScript", "MyLog");
f1.WriteLine(log);
f1.Close();
</script>
If you want to copy your log into the clipboard :
window.clipboardData.setData('Text', log);
Bye
--
Olivier Ligny
Créateur web free-lance / www.cyber-tamtam.net
| |
| chtorner 2005-10-17, 6:30 pm |
| thanx alot, but this is not so much the prob. putting strings via
javascript is ok.
but i need to catch the informations out of the active vrml scene, like
user position, camerainfo, actions the user did etc....
O=2EL. schrieb:
> chtorner a pens=E9 tr=E8s fort :
>
> First you need to get your log, which will have been generated by a
> vrml Script node, and placed in a field.
> log =3D VRML.getNodeEventOut("MyScript", "MyLog");
>
>
> Do you want to write it in a local file ? It will be difficult, for
> security reasons ... But it's possible, using the FileSystemObject of
> Internet Explorer :
>
> <embed id=3DVRML ...>
> <script>
> fso =3D new ActiveXObject("Scripting.FileSystemObject");
> f1 =3D fso.CreateTextFile("c:\\windows\\bureau\\testfile.txt", true);
> log =3D VRML.getNodeEventOut("MyScript", "MyLog");
> f1.WriteLine(log);
> f1.Close();
> </script>
>
> If you want to copy your log into the clipboard :
> window.clipboardData.setData('Text', log);
>
> Bye
>
> --=20
> Olivier Ligny
> Cr=E9ateur web free-lance / www.cyber-tamtam.net
| |
| Dknight 2005-10-18, 6:22 am |
| Nice topic I too would like to know how to create such log file.
But I too have no ideas how to realize that
| |
|
| chtorner a pensé très fort :
> thanx alot, but this is not so much the prob. putting strings via
> javascript is ok.
> but i need to catch the informations out of the active vrml scene, like
> user position, camerainfo, actions the user did etc....
You need to create a ProximitySensor, routed to a Script which will
receive the user position and orientation, and log that into a
SFString.
For the other informations you gave, you must implement this yourself
in your scene.
Now, a tip : if you want to display user position/rotation in the IE
status bar, press F8 (it works in Blaxxun Contact).
--
Olivier Ligny
Créateur web free-lance / www.cyber-tamtam.net
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|