Active Script reference?

To the Ipswitch web site

Ipswitch Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Active Script reference?Expand / Collapse
Author
Message
Posted 5/14/2008 1:48:55 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 8/26/2008 5:14:49 PM
Posts: 87, Visits: 104
There seems to be precious little in the way of documentation of available objects in the scripting environment. From the examples I've been able to figure out that there are 3 objects, all children of the CoreASP object, and all related to SNMP functionality. Also a Context object that seems to deal with the device in question. I'm sure that's not the extent of what can be done with these scripts; is there something I'm missing, or is the scripting really that limited?

I guess I'm expecting to have an actual programming reference, listing all the available objects and their methods and properties.
Post #43799
Posted 5/14/2008 3:08:16 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 8/26/2008 5:14:49 PM
Posts: 87, Visits: 104
I just realized that some of that stuff I was looking at was for version 12, I'm interested in version 11.
Post #43805
Posted 5/15/2008 5:27:38 AM
Time Traveler

Time TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime Traveler

Group: Forum Members
Last Login: 8/25/2008 6:03:53 AM
Posts: 534, Visits: 1,877
No, there's only what you described. There may be one or 2 properties of them which are not documented, but that's all there is to it.
Still, it's more than enough to code almost anything you need.

Remember, they are VBScript/JScript scripts : so whatever can be used in these languages can be used in a ActiveScript.
File objects, SQL connections, network objects...
Post #43829
Posted 5/15/2008 1:03:05 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 8/26/2008 5:14:49 PM
Posts: 87, Visits: 104
MB - NS (5/15/2008)
No, there's only what you described. There may be one or 2 properties of them which are not documented, but that's all there is to it.
Still, it's more than enough to code almost anything you need.

Remember, they are VBScript/JScript scripts : so whatever can be used in these languages can be used in a ActiveScript.
File objects, SQL connections, network objects...


Ah, but how is one to find out how to get SQL connections, etc? Does VBScript have access to more objects than JScript, or can they both do all the same functions? Sorry if I sound a bit dim, this is really my only exposure to this Microsoft stuff. Mostly I work with PHP and client-side Javascript.
Post #43847
Posted 5/15/2008 1:34:47 PM


Time Traveler

Time TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime Traveler

Group: WhatsUp Gold Expert
Last Login: Today @ 6:26:34 AM
Posts: 1,408, Visits: 3,640
you should search on microsoft.com for "the scripting factory". There are plenty of .chm help files with explanations and pre-made scripts. It's a good starting point.

Reading, writing and arithmetic - If you need to choose, please take option 1.
Post #43849
Posted 5/16/2008 4:43:22 AM
Time Traveler

Time TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime Traveler

Group: Forum Members
Last Login: 8/25/2008 6:03:53 AM
Posts: 534, Visits: 1,877
miken32 (5/15/2008)

Ah, but how is one to find out how to get SQL connections, etc? Does VBScript have access to more objects than JScript, or can they both do all the same functions? Sorry if I sound a bit dim, this is really my only exposure to this Microsoft stuff. Mostly I work with PHP and client-side Javascript.


There are plenty of ressources on the web with script examples, tutorials, and so on, not only on Microsoft websites.
To make it short, you find it out exactly the same way as you do when writing code using PHP or Javascript.
Post #43861
Posted 5/20/2008 6:56:04 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 8/26/2008 5:14:49 PM
Posts: 87, Visits: 104
MB - NS (5/16/2008)
miken32 (5/15/2008)

Ah, but how is one to find out how to get SQL connections, etc? Does VBScript have access to more objects than JScript, or can they both do all the same functions? Sorry if I sound a bit dim, this is really my only exposure to this Microsoft stuff. Mostly I work with PHP and client-side Javascript.


There are plenty of ressources on the web with script examples, tutorials, and so on, not only on Microsoft websites.
To make it short, you find it out exactly the same way as you do when writing code using PHP or Javascript.


Got that, thanks. But aren't any of these things specific to WhatsUp? Doesn't the environment you're running the script in have any bearing on it?

It would be like trying to make a Javascript web page without knowing anything about the document object, if you know what I mean. The Javascript language itself is one thing, but the client it runs in is where the real abilities lie.
Post #43966
Posted 5/21/2008 4:47:38 AM
Time Traveler

Time TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime Traveler

Group: Forum Members
Last Login: 8/25/2008 6:03:53 AM
Posts: 534, Visits: 1,877
I have no experience in JScript scripts, so I can only speak for VBScript.

You can use whatever is available in VBScript in a ActiveScript.
An additional object is available, it is the Context object.

Another way to say it is that your ActiveScript is run exactly as it would be if made into a VBS file, and run by double-clicking it.
The ActiveScript is run with the WUG service account. By default, it's LocalSystem, so the script won't be able to access any ressources outside the WUG box.

There ARE very small and specific things that won't work well within an ActiveScript : launching several threads for instance.
However I wrote a few number of scripts, and saw several quite complex scripts that worked very well without running into these little glitches.
Post #43973
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Dave, Mark Singh, kevin r gillis, Jason Benton, Brandon Felger, Ben Henderson, Tripp Allen, Will Sansbury, Hush, FTPplanet.com, Hugh Garber, George Dailey, WUP-PM, mmulryan@ipswitch.com, mswimm

PermissionsExpand / Collapse