Sub main(tpath,qTempPath,qTpath, qFileName,relatExt)
Dim str
str = DelLastSeparate(qTpath,"\")
if not fso.FolderExists(str) then
'msgbox "not net "
if left(str,2) = "\\" then
str = right(str,len(str)-2)
call CreateNetDir(str)
else
call createdir(str)
end if
end if
'msgbox "qtempPath" & qtempPath
fso.CopyFile qTempPath,qTpath, true
if relatExt <> "" then
call processRelatFile(qTemppath,qTpath,relatExt)
End if
End Sub
// main 里面的函数, 如果有修改的话,我想返回到DELPHI里面继续使用
//DELPHI 里面是这样调用的,但是不能返回脚本里面的修改值
function runscript:boolean;
var
vse : variant;
...
begin
VSE := CreateOleObject('MSScriptControl.ScriptControl');
...
Result :=not vse.run(main,tpath,qTempPath,qTpath,qFileName,relatExt);
end;
//RUN的参数是这样的:
//vse.run(Const procedureName:widestring; var Parameters:pSafeArray):OLEVariant;