本帖最后由 xsjtxy 于 2010-8-11 18:21 编辑
你试试这样能获取不
10楼的代码。$path = "c:\program Files\commend\test 123.au3 这里是参数.exe 这里是参数2.exe"
$path2 = "F:\game\tools\include\ChangDesk.exe f:\game\tools\img\ /gui"
$path3 = "C:\Program Files\Internet Explorer\IEXPLORE.EXE http://baidu.com/test"
MsgBox (0,"",$path & @CRLF& "的参数是:" & _getParam ($path) &@CRLF & _
$path2 & @CRLF & "的参数是:" &_getParam ($path2) &@CRLF & _
$path3 & @CRLF & "的参数是:" & _getParam ($path3))
Func _getParam ($str)
$var = StringRegExpReplace ($str,'\S:\\.+\\.+\.\S{3}\h(.+)','$1')
$var = StringReplace ($var," ","|")
Return $var
EndFunc
|