// This is a part of the DemoApp control // Copyright (C) 2007 BeiJing XXX Limited Corporation // All rights reserved. // // This source code is only intended as a demo of using DemoApp // control in JScript. It works in WScript/CScript script host // environment only. You can write you own code like this so // that they can work in the Internet Explorer. // main(); function main() { try{ var DemoApp, bOK, rnd; DemoApp =new ActiveXObject("DemoApp.DemoCtrl"); bOK = DemoApp.isInstalled(); if (bOK){ WScript.echo("已经安装!");
ver = DemoApp.getVersion(); vmx = (ver >>8) &0xff; vmn = ver &0xff; WScript.echo("Version:"+vmx.toString()+"."+vmn.toString());
WScript.echo("""+DemoApp.getString(0, 50)+""");
var name = DemoApp.getName(); WScript.echo("""+name+""");
var pass = DemoApp.getPassword(); WScript.echo("""+pass+""");
var seek = DemoApp.getSeek(); WScript.echo("""+seek+""");