#include <Array.au3> #include <File.au3> $jsCode = FileRead(@ScriptDir & "\js.js") If @error Then MsgBox(0,"", "没读到js文件") $nJS = ObjCreate("ScriptControl") $nJS.language = "JavaScript" $nJS.addcode($jsCode) $nResult = $nJS.eval('gets()') If @error Then MsgBox(0,"eval",@error) If IsArray($nResult) Then _ArrayDisplay($nResult) Else ConsoleWrite($nResult) EndIf
function gets() { return Array(1,2,3,4,5,6,7,8,9); }
举报
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2024-12-23 07:15 , Processed in 0.078961 second(s), 23 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.