fhp2009 发表于 2011-8-25 20:16:07

关于返回值的问题

假设有两个AU3文件生成的程序:file1.exe,file2.exe
file1的程序编写如下;
test()
Func test()
        $test = 1
        Return 1
EndFunc
在file2中运行file1,如何获得file1的返回值?

pusofalse 发表于 2011-8-25 20:27:09

file1.exe 改成 Exit test(),file2.exe 调用RunWait运行file1,获取退出代码。

fhp2009 发表于 2011-8-25 20:32:04

试过了,很好使,多谢!

fhp2009 发表于 2011-8-25 20:33:43

帮助文件中确实有,
Exit
return code Integer that sets the script's return code. This code can be used by Windows or the DOS variable %ERRORLEVEL%. The default is 0. Scripts normally set an errorlevel of 0 if the script executed properly; error levels 1 and above typically indicate that the script did not execute properly.

hzxymkb 发表于 2011-8-25 23:04:10

回复 2# pusofalse


    怎么获取能出代码?请P版指点一下小弟!

fhp2009 发表于 2011-8-29 18:11:13

怎么获取能出代码?....什么意思?没明白

cxlater 发表于 2011-8-30 00:28:47

runwait的返回值就是退出代码
页: [1]
查看完整版本: 关于返回值的问题