JavaScript or Jcript

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

JavaScript or Jcript // Archive: Tech Forum

1  |  

Post by 50CalCrazy // Feb 16, 2007, 8:11pm

50CalCrazy
Total Posts: 16
Hi All,


I have been studying the Developers Guide and I have come to page 132 which states that a person can find information about Jscript at microsoft's homepage (See screen grab below). I have also found pages in the TS Manual that state that the Script editor is using Javascript.


What is my point, you might ask? Well, Jscript is a Microsoft version of Javascript and they are definitely not the same language. So my question is this. Does TS use Javascript of Jscript? It is an important distinction. If it is javascript, then the instrucion on page 132 of the DG is wrong because the microsoft website only shows how to use jscript, not javascript.


Believe me, I hope it uses javascript. The last book that covered microsoft Jcript was published in 1996, and I can not find any others in existence!!


So, who votes that it is Javascript, the language based on Sun-Microsystems' Java Language to be used on Netscape circa 1995.


And, who votes that is is Jscript, the language created by Microsoft circa 1995 that is similar to Javascript to be used in Internet Explorer.:confused:

Post by Emma // Feb 17, 2007, 12:02am

Emma
Total Posts: 344
pic
This mentioning of javascript / jScript gets indeed mixed up quite often. For myself I use a book published in 2002 about the basics of JavaScript. The whole part for "object theory", type of variables, loops, condidtions, most functions are the same as for jScript, but you can forget everything that has to do with web sites.

What trueSpace seems to use is definitely jScript as a "subpart" and sometimes you have to try if it works.

To get an overview what is possible and how it can be used I suggest to look into the Interactive Artwork thread and look inside the objects that contain scripts. Wigand's script are written in VBScript, so that shows you an alternative. :rolleyes: hmmm didnt you say something "...already about 100ts of hours...."


There is also first parts in the Tutorium thread which at the moment cover just jScript but surely will contain VBScript in the near future too.


With your posting I just realized that there still is no complete documentation, listing the whole set of jScript commands that can be used with trueSpace. Will collect this together, but perhaps someone else does already have it to get it published here ??? Anyway, the real power of scripting (VBScript and jScript) is hidden in trueSpace internals that can be called through System.CreateDo. For that I created already an overview (see attached PDF file) that is still not complete. If you can handle all that almost everything should be possible.

This explains a bit why there is not much more needed than jScript or VBScript to control trueSpace. If you see what all has been done so far in the Interactive Artwork thread from games to displays, from effects to change of trueSpace layouts, even adding ActiveXcontrols to get access to joysticks, UDP chat or control, MIDI stuff .....

Post by ProfessorKhaos // Feb 17, 2007, 4:52am

ProfessorKhaos
Total Posts: 622
pic
Emma, you just saved me tons and tons of work! :D


I still gotta figure out what all those accessor methods do in many cases, but just seeing them all in one place is a huge step forward. Thank you for working on this!!!


P.K.

Post by Emma // Feb 17, 2007, 8:42am

Emma
Total Posts: 344
pic
:D That's just fine that it is of use, now let's go hunting for someone who has the ones listed that I couldn't find so far,:rolleyes: perhaps some Caligari staff memebers or Betatesters:D

In fact I already published it in the Scriptorium but there was not much notice (downloads) taken of it. Meanwhile I think we should get a certain place, perhaps Tutorium or so, where we could get all those little helpers together in one location. List of VBScript command, list of jScript commands, list of how to convert jScript <-->VBScript comands into each other are the ones on my personal wish list at the moment.


If you want I can send you the PDF file for editing as open document, Word or txt and whenever you have done any remarks / add ons to one of the accessor methods the list can be extended.;)

Post by ProfessorKhaos // Feb 17, 2007, 10:08am

ProfessorKhaos
Total Posts: 622
pic
Alas, I don't have direct PDF editing capabilities (suppose I may be able to cut/paste) but I'd gladly contribute to any tutorial to the extent that I can.


At the moment I'm better at JScript/Javascript than VBScript but I'm working on it.


Just for all folks out there, here's a quick online reference link I've found helpful for the majority of my "general" scripting needs.


http://javascript-reference.info/#logic


Though it's javascript rather than "jscript" I think it works pretty much either.

Post by stan // Feb 17, 2007, 10:24am

stan
Total Posts: 1240
pic
there is this at msdn .. the jscript reference guide
http://msdn2.microsoft.com/en-us/library/yek4tbz0.aspx (http://http://msdn2.microsoft.com/en-us/library/yek4tbz0.aspx)

Post by 50CalCrazy // Feb 20, 2007, 7:38am

50CalCrazy
Total Posts: 16
HI Emma,


I saw your questions about a reference for commands and I was wondering if you have seen the ScriptObjects folder that came with the Developer's Guide. I have an example in the screen grab below. When I downloaded the DV I recieved the ScriptObjects and DataObjects folders and they appear to be loaded with scripting. I don't know if these are the things you are looking for, but it seems like a lot of stuff.


If you don't have it I may be able to give you a link to it.

Post by 50CalCrazy // Feb 20, 2007, 7:43am

50CalCrazy
Total Posts: 16
hmmm didnt you say something "...already about 100ts of hours...."

.....


Yes, and I am at it again this week. I need to get some kind of direct brain download so I can just plug this stuff straight into my head. It would save my eyes a lot or work.

Post by Emma // Feb 20, 2007, 10:50am

Emma
Total Posts: 344
pic
Yes, I do have those manual parts too. The problem is they are just kind of a strict reference manual. What would be necessary is a Users manual for scripting.

You have those listings like in the NodeSriptObjects part, but not more than 3 or for examples for the functions, only the syntax is written. That is a typical reference manual style used by programmers who know their programming language but not every single parameter used for each function (or command). so we come back to the beginning, you first need a users manual to learn the basics, the structure, the dependencies, the rules. What I'm doing for myself is getting kind of a users manual together by writing down what I'm experimenting with, which again needs input feed from either by reading through the samples in ts7 or by things others published here in the forum.

Everybody has his own and individual way of learning, understanding and doing. As for the CreateDO I do myself for example reformat to a view that I like more. Just a short example is just those NodeSriptObjects which I changed to


Activity Create ([in] BSTR idName,[in] VARIANT vOwner,[out, retval] VARIANT *pVal)



Activity Run ([in] BSTR bszActivityName)

Activity Stop ([in] BSTR bszActivityName)

Activity KillAll ( )


RsApp Shutdown (void)

RsApp Help (void)

RsApp Undo (void)

RsApp Redo (void)

RsApp RunScript ([in] BSTR fileName)

RsApp TimerActivate ([in] BSTR szTimerName,[in] RtUlong dwPeriod)

RsApp TimerDeactivate ([in] BSTR szTimerName)

RsApp Load ([in] VARIANT szFileName,[out, retval] VARIANT *pVal)

RsApp Save ([in] VARIANT szFileName)

RsApp SaveHistory ([in] VARIANT szFileName)

RsApp LoadHistory ([in] VARIANT szFileName)

RsApp ImportPackage ([in] BSTR clsidPck)

RsApp RootCreate (void)

RsApp SetCachingMode ([in] BSTR cachingMode,[in] BOOL bUpdate)

RsApp CreateLogHandler ([in] BSTR clsid,[out, retval] RtUlong *pHandlerId)

RsApp DestroyLogHandler ([in] RtUlong handlerId)

RsApp Reset (void) RsApp SendCustomEvent ([in] BSTR bsNodeName,[in] VARIANT vCustomData)

RsApp SuspendLogHandler ([in] RtUlong handlerId,[in] BOOL bSuspend)

RsApp SuspendLogHandlers ([in] BOOL bSuspend) RsApp ClearHistory (void)

RsApp AllTimersDeactivate ([in] BSTR szEncapsName)

RsApp RunScriptBuffer ([in] BSTR Buffer)

RsApp HistoryLength ([out, retval] RtUlong *pVal)

RsApp HistoryLength ([in] RtUlong newVal)


RsFileIO SaveObject ([in] BSTR bszFileName,[in] BSTR bszObjName)

RsFileIO LoadObject ([in] BSTR bszFileName,[in] BSTR bszOwnerName,[out, retval] BSTR *pVal)


MeshModifiers BuildNormalmap ([in] BSTR bszSelection)

MeshModifiers SimplifyMesh ([in] BSTR bszSelection)

MeshModifiers ChangeSSLevel ([in] int iDiff) MeshModifiers ShowMeshEditSettings ([in] BSTR WinID)

MeshModifiers TipSelection ([in] BSTR bszSelection)

MeshModifiers NormalSweepSelection ([in] BSTR bszSelection)

MeshModifiers WeldSelection ([in] BSTR bszSelection)

MeshModifiers DeleteElements ([in] BSTR bszSelection)

MeshModifiers FlipFacesNormals ([in] BSTR bszSelection)

MeshModifiers SplitPolygons ([in] BSTR bszSelection)

MeshModifiers MergePolygons ([in] BSTR bszSelection)

MeshModifiers ExtrudeSelection ([in] BSTR bszSelection)

MeshModifiers DuplicateSelection ([in] BSTR bszSelection)

MeshModifiers MirrorSelection ([in] BSTR bszSelection)

MeshModifiers Subdivide ([in] BSTR bszSelection)

MeshModifiers Smoothdivide ([in] BSTR bszSelection)

MeshModifiers AddFace ([in] BSTR bszSelection


Space NewScene (void)

Space Select (BSTR name)

Space Unselect (void) Space DisplayAll (void)

..............


So you see, others also need hours and hours and hours..... On the weekend I'll have more time to think some more about this Start/Stop 1 or 0 true or false. Myself I would be interested in using that mechanism working for an interactive CPU which shows step by step in 3D how the inside works. Could be advanced to get an old IBM 1620 (a BCD calculating machine), or a KIM 1 working alive. Other ideas would be Analog Computers or Hybrid computers which are totally forgotten today.


In sum, only exchanging intensiv in this forum seems to be the only way at the moment
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn