| | | Supreme 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. |
| | | | Supreme 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. |
| | | | Time 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... |
| | | | Supreme 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. |
| | | | 
Time 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. |
| | | | Time 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. |
| | | | Supreme 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. |
| | | | Time 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. |
| |
|
|