找回密码
 加入
搜索
查看: 2606|回复: 6

[效率算法] 关于返回值的问题

  [复制链接]
发表于 2011-8-25 20:16:07 | 显示全部楼层 |阅读模式
假设有两个AU3文件生成的程序:file1.exe,file2.exe
file1的程序编写如下;
test()
Func test()
        $test = 1
        Return 1
EndFunc
在file2中运行file1,如何获得file1的返回值?
发表于 2011-8-25 20:27:09 | 显示全部楼层
file1.exe 改成 Exit test(),file2.exe 调用RunWait运行file1,获取退出代码。
 楼主| 发表于 2011-8-25 20:32:04 | 显示全部楼层
试过了,很好使,多谢!
 楼主| 发表于 2011-8-25 20:33:43 | 显示全部楼层
帮助文件中确实有,
Exit [return code]
return code [optional] 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.
发表于 2011-8-25 23:04:10 | 显示全部楼层
回复 2# pusofalse


    怎么获取能出代码?请P版指点一下小弟!
 楼主| 发表于 2011-8-29 18:11:13 | 显示全部楼层
怎么获取能出代码?....什么意思?没明白
发表于 2011-8-30 00:28:47 | 显示全部楼层
runwait的返回值就是退出代码
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-2 21:51 , Processed in 0.082535 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表