找回密码
 加入
搜索
查看: 1557|回复: 2

[网络通信] 【已解决】请教ShellExecuteWait()子程序怎么接收传递的参数

[复制链接]
发表于 2019-11-25 09:31:42 | 显示全部楼层 |阅读模式
本帖最后由 qxguoxing 于 2019-11-26 10:10 编辑

;主程序
#include <MsgBoxConstants.au3>
#include <Debug.au3>

Local $sFile = @ScriptDir & "\TestChild.au3"
ShellExecuteWait($sFile, " Testfdgsfdgfdsg")


;子程序
#include <MsgBoxConstants.au3>
#include <Array.au3>
#include <WinAPIShPath.au3>

Test()
Func Test()
        Local $aCmdLine = _WinAPI_CommandLineToArgv($CmdLineRaw)
        _ArrayDisplay($aCmdLine)
EndFunc   ;==>Test


目前已测,如果是未编译a3文件,想要通过实时传参,可以采用IniWrite()和IniRead()函数方式达到。
 楼主| 发表于 2019-11-25 10:30:53 | 显示全部楼层
帖子怎么删除啊?
 楼主| 发表于 2019-11-25 10:32:20 | 显示全部楼层
目前找到的方案是,子程序编译成exe文件,ShellExecuteWait传递参数,子程序才能通过$cmdline获取到。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-20 16:33 , Processed in 0.069745 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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