![]() |
| SB Home | Buy | Support | Site Home |
To be a competent script programmer depends on two things: one is language skill, the other is the amount of ActiveX objects you can use. ScriptBoard focues on the second - It helps you to understand ActiveX objects quickly and precisely, and more importantly, with less pain. (See screenshot)
Without any MS Word programming experiences, with the help of ScriptBoard, within an hour, I understood how to manipulate complex tables of Word Doc - A nitpicking customer of mine required the printed reports must look the same as their samples, which were prepared with MS Word. I must X-ray their sample document before I can program it. To do so, I typed these two script lines on ScriptBoard's Script Editor pane, then pressed F5 to execute the codes. (See screenshot)
sb.open("medias.doc");
sb.it(sb.document);
Again, when many people were reading tons of articles on WMI programming, I was clicking on the tree nodes of ScriptBoard's IT pane, letting ScriptBoard tell me what a Win32 class was about. All I had to do is to let ScriptBoard to execute these three lines of JavaSript. (See screenshot)
var svc=GetObject("winmgmts:");
var procs=svc.InstancesOf("Win32_Process");
sb.IT(procs);
ScriptBoard supports both JavaScript and VBScript. It has a library, which you keep your well-tested script functions. You can have as many library items as you need. When the script engine initiates, you selected library ites are automatically loaed - you don't have to put every thing into the Script Eiditor's view. (See screenshot)
In JavaScript codes, you can use VBScript functions implemented in your library, and vice versa. (See screenshot)
As we know, there are two types of ActiveX, some have windows, such as WinWord, Excel, PDF, Flash, the others don't, such as WMI. If the ActiveX has a window, the window is shown on the top-left pane - thus, when you change a property or run a method of the object, the window reflects the changes.
Window or Windowless, the IT pane is the live contents of the object, not just a static model.
The SB.IT(object) method displays the structure of a ActiveX object. What are the methods implmented by ScriptBoard? You can IT them too. (See screenshot). The Best Help Is Self Help!
Constants are constantly problems when you are programming outsite of the ActiveX. For example, 'wdGoToPage' is OK when used in Word Macros, but invalid when used anywhere else. You have to search for its true value, and what worse is, these constants change from version to version. With ScriptBoard, two methods make this easy: FindConst and ListConsts. Here is a complete copy of Microsoft Word 9.0 Constants listed using the ListConsts method, and this is the screenshort shows how this is done.
ScriptBoard has implemented a set of methods that you can use in your script codes, for example, when you program WMI, you can use the ULxxxx mehtods to display the query results in the list view. See Screenshot here and source codes below.
sb.ULDeleteAllCols();
var svc=GetObject("winmgmts:");
var procs=svc.ExecQuery("Select Name, ProcessId, Handle, ParentProcessId, ExecutablePath from Win32_Process");
var e= new Enumerator(procs);
var row=0;
while(!e.atEnd())
{
var e2= new Enumerator(e.item().Properties_);
while(!e2.atEnd())
{
var n=e2.item().Name;
var t=e2.item().Value;
if(t==null)
t="";
else
t=t.toString();
sb.ULSetCellText(row, n, t);
e2.moveNext();
}
e.moveNext();
row++;
}
ScriptBoard is a portable application - single executable file, no setup required. Click to download the trial version, about 200K