Add(MainForm,2953706,35,105)
{
Width=325
Height=485
Caption="Windows Script Host"
link(onCreate,4433528:doEnumKeys,[])
}
Add(Registry,4433528,84,105)
{
Key="CLSID"
Point(doEnumKeys)
Point(onEnumKey)
link(onEnumKey,5349046:doValue,[])
}
Add(Memo,1962165,581,126)
{
Width=309
Height=446
Align=5
ScrollBars=3
}
Add(Registry,6922578,273,112)
{
Point(doEnumKeys)
Point(onEnumKey)
Point(doEnumValues)
Point(onEnumValue)
link(onRead,10123519:doValue,[(312,118)(312,111)(389,111)(389,69)])
link(onEnumKey,12903208:doCompare,[])
}
Add(StrCatDelim,2771630,182,112)
{
Delimiter="\"
Str1="CLSID"
link(onStrCatDlm,5916141:doEvent1,[])
}
Add(StrMask,12903208,322,119)
{
Mask="Implemented Categories"
link(onTrue,506904:doStrCatDlm,[])
}
Add(Registry,4107532,427,112)
{
Point(doExistsKey)
Point(onExistsKey)
link(onExistsKey,3856968:doEvent,[])
}
Add(StrCatDelim,506904,378,126)
{
Delimiter="\"
Str2="Implemented Categories\{F0B7A1A1-9847-11CF-8F20-00805F2CD064}"
link(onStrCatDlm,4107532:doExistsKey,[])
link(Str1,2771630:Result,[(384,117)(370,117)(370,159)(188,159)])
}
Add(IndexToChanel,3856968,476,119)
{
link(onEvent2,12491801:doString,[])
}
Add(FormatStr,12491801,525,126)
{
DataCount=3
Mask="Description: %1\r\nProgram ID: %2\r\nCLSID: %3\r\n-----------------------------------"
link(onFString,1962165:doAdd,[])
link(Str1,10123519:Value,[])
link(Str2,9339482:Value,[(538,103)(566,103)])
link(Str3,5349046:Value,[(545,117)(517,117)(517,166)(139,166)])
}
Add(Hub,5916141,231,112)
{
OutCount=3
link(onEvent1,933872:doStrCatDlm,[(256,118)(256,62)])
link(onEvent2,6922578:doRead,[(263,125)(263,118)])
link(onEvent3,6922578:doEnumKeys,[])
}
Add(Memory,10123519,525,63)
{
}
Add(Memory,5349046,133,112)
{
link(onData,2771630:doStrCatDlm,[])
}
Add(Registry,13982380,329,56)
{
Point(doEnumKeys)
Point(onEnumKey)
Point(doEnumValues)
Point(onEnumValue)
link(onRead,9339482:doValue,[])
}
Add(StrCatDelim,933872,273,56)
{
Delimiter="\"
Str2="ProgID"
link(onStrCatDlm,13982380:doRead,[])
}
Add(Memory,9339482,560,56)
{
}
JScript, получение списка используемых библиотек.
Add(MainForm,14913934,98,154)
{
Width=325
Height=485
Caption="JScript Language"
link(onCreate,4433528:doEnumKeys,[])
}
Add(Registry,4433528,154,154)
{
Key="CLSID"
Point(doEnumKeys)
Point(onEnumKey)
link(onEnumKey,5349046:doValue,[])
}
Add(Memo,1962165,504,175)
{
Width=309
Height=446
Align=5
ScrollBars=3
}
Add(Registry,6922578,343,168)
{
Point(doEnumKeys)
Point(onEnumKey)
Point(doEnumValues)
Point(onEnumValue)
link(onRead,12903208:doCompare,[])
}
Add(StrCatDelim,2771630,252,161)
{
Delimiter="\"
Str1="CLSID"
link(onStrCatDlm,5916141:doEvent1,[])
}
Add(Hub,5916141,301,161)
{
OutCount=3
link(onEvent1,506904:doStrCatDlm,[(326,167)(326,118)])
link(onEvent2,6922578:doRead,[])
}
Add(Memory,5349046,203,161)
{
link(onData,2771630:doStrCatDlm,[])
}
Add(StrMask,12903208,392,168)
{
Mask="JScript Language*"
link(onTrue,12491801:doString,[])
}
Add(FormatStr,12491801,448,175)
{
DataCount=3
Mask="Description: %1\r\nInprocServer32: %2\r\nCLSID: %3\r\n-----------------------------------"
link(onFString,1962165:doAdd,[])
link(Str2,15133872:Value,[])
link(Str3,5349046:Value,[(468,166)(440,166)(440,208)(209,208)])
}
Add(Registry,8603243,392,112)
{
Point(doEnumKeys)
Point(onEnumKey)
Point(doEnumValues)
Point(onEnumValue)
link(onRead,15133872:doValue,[])
}
Add(StrCatDelim,506904,343,112)
{
Delimiter="\"
Str2="InprocServer32"
link(onStrCatDlm,8603243:doRead,[])
}
Add(Memory,15133872,455,112)
{
}
Далее только для обладателей Windows10.
jscript.dll – обработчик(интерпретатор) сценариев JScript
jscript9.dll - текущий (устаревший) движок Chakra. Обратная совместимость существующих скриптов jscript
chakra.dll - новый движок Chakra (в Windows 10 / Edge)
Сравнение быстродействия JScript и JScript9 (после запуска JScript дождитесь окончания ~90 сек)
Add(Label,13557726,140,518)
{
Width=375
Height=30
Align=2
Caption=""
AutoSize=1
}
Add(MainForm,16417920,140,469)
{
Width=391
Height=546
Point(onClose)
link(onCreate,927093:doConvert,[])
}
Add(Memo,6453024,448,546)
{
Top=30
Width=375
Height=477
Align=5
Font=[Consolas,12,0,0,204]
ScrollBars=3
}
Add(WinExec,8827366,336,532)
{
FileName="cscript"
Mode=0
Point(doConsoleExec)
Point(onConsoleResult)
Point(onConsoleError)
link(onConsoleResult,9033456:doWork2,[])
link(onConsoleError,9033456:doWork3,[(382,559)])
}
Add(TempFileStream,8761983,245,483)
{
Extention=".js"
}
Add(StreamConvertor,927093,196,483)
{
Mode=7
Point(Data)
link(onResult,8761983:doCreate,[])
link(Data,8853506:Text,[])
}
Add(Charset,15836611,399,546)
{
link(onCharset,6453024:doAdd,[])
}
Add(FormatStr,13415778,245,588)
{
DataCount=1
Mask="/nologo /E:{16d51579-a30b-4c8b-a276-0ff4dc41e755} %1 "
link(onFString,9244536:doEvent2,[(291,594)(291,559)])
link(Str1,7863614:Var2,[])
}
Add(Hub,9244536,308,546)
{
InCount=2
OutCount=1
link(onEvent1,8827366:doConsoleExec,[])
}
Add(FormatStr,15633364,252,546)
{
DataCount=1
Mask="/nologo %1 "
link(onFString,9244536:doEvent1,[])
link(Str1,7863614:Var3,[(258,537)])
}
Add(Button,10080432,189,546)
{
Left=40
Top=5
Caption="JScript"
link(onClick,15633364:doString,[])
}
Add(Button,1557168,189,588)
{
Left=120
Top=5
Caption="JScript9"
link(onClick,13415778:doString,[])
}
Add(GetDataEx,7863614,245,532)
{
link(Data,8761983:TempFName,[])
}
Add(VisualStrings,8853506,196,14)
{
Lines=#37:WScript.Echo( ScriptEngine() + ": " +|48: ScriptEngineMajorVersion() + "." +|48: ScriptEngineMinorVersion() + "." +|42: ScriptEngineBuildVersion());|0:|17:function foo(o) {|16: var total = 0;|38: for (var i = 0; i < 10000000; i++) {|29: total += o.x + o.y + o.z;|3: }|15: return total;|1:}|0:|25:function Point(x, y, z) {|13: this.x = x;|13: this.y = y;|13: this.z = z;|1:}|0:|17:function main() {|18: var counter = 0;|32: for (var i = 0; i < 20; i++) {|27: var start = new Date();|33: var p1 = new Point(2, 5, 11);|25: var result = foo(p1);|25: var end = new Date();|68: WScript.Echo(++counter + ": " + (end - start) + "ms " + result);|3: }|1:}|0:|7:main();|
Width=347
Height=431
}
Add(HubEx,9033456,378,546)
{
link(onEvent,15836611:doCharset,[])
}
Add(MainForm,16417920,63,133)
{
Width=579
Height=326
Point(onClose)
link(onCreate,927093:doConvert,[])
}
Add(Memo,6453024,378,147)
{
Width=563
Height=287
Align=5
Font=[Consolas,12,0,0,204]
ScrollBars=3
}
Add(WinExec,8827366,273,133)
{
FileName="cscript"
Mode=0
Point(doConsoleExec)
Point(onConsoleResult)
Point(doConsoleTerminate)
Point(onConsoleError)
link(onConsoleResult,85276:doWork2,[])
link(onConsoleError,85276:doWork3,[(319,160)])
}
Add(TempFileStream,8761983,168,147)
{
Extention=".js"
link(onCreate,5028372:doString,[])
}
Add(StreamConvertor,927093,119,147)
{
Mode=7
Point(Data)
link(onResult,8761983:doCreate,[])
link(Data,5232254:Text,[])
}
Add(HubEx,85276,315,147)
{
link(onEvent,15836611:doCharset,[])
}
Add(Charset,15836611,329,147)
{
link(onCharset,6453024:doAdd,[])
}
Add(FormatStr,5028372,224,147)
{
DataCount=1
Mask="/nologo /E:{1B7CD997-E5FF-4932-A7A6-2A9E636DA385} %1 "
link(onFString,8827366:doConsoleExec,[])
}
Add(VisualStrings,5232254,119,56)
{
Lines=#78:let json ='{"response":{"count":39,"items":[{"mob":51,"drop":458701246}]}}';|59:let pretty = JSON.stringify(JSON.parse(json), null, '\t');|17:WSH.Echo(pretty);|
Width=389
Height=53
}
Проверено на
- Windows 10 (x64)
- Hiasm v4.05 build 186 (delphi) rev - 2405
- MS Office 365
Всё одним архивом - https://forum.hiasm.com/getfile/39662