这个貌似不行
我用的这个方法..
Func zhixing($v,$q)
;MsgBox(0,"0",$q)
Local $a="",$b="",$c="",$d="",$e="",$f="",$g="",$h="",$i="",$j="",$k=""
$text = StringReplace($q, ",", ",")
$numreplacements = @extended
Switch $numreplacements
Case 0
$a=$q
Case 1
$a=StringMid($q,1,StringInStr($q,",",0,1)-1)
$b=StringMid($q,StringInStr($q,",",0,1)+1)
Case 2
$a=StringMid($q,1,StringInStr($q,",",0,1)-1)
$b=StringMid($q,StringInStr($q,",",0,1)+1,StringInStr($q,",",0,2)-StringInStr($q,",",0,1)-1)
$c=StringMid($q,StringInStr($q,",",0,2)+1)
Case 3
$a=StringMid($q,1,StringInStr($q,",",0,1)-1)
$b=StringMid($q,StringInStr($q,",",0,1)+1,StringInStr($q,",",0,2)-StringInStr($q,",",0,1)-1)
$c=StringMid($q,StringInStr($q,",",0,2)+1,StringInStr($q,",",0,3)-StringInStr($q,",",0,2)-1)
$d=StringMid($q,StringInStr($q,",",0,3)+1)
Case 4
$a=StringMid($q,1,StringInStr($q,",",0,1)-1)
$b=StringMid($q,StringInStr($q,",",0,1)+1,StringInStr($q,",",0,2)-StringInStr($q,",",0,1)-1)
$c=StringMid($q,StringInStr($q,",",0,2)+1,StringInStr($q,",",0,3)-StringInStr($q,",",0,2)-1)
$d=StringMid($q,StringInStr($q,",",0,3)+1,StringInStr($q,",",0,4)-StringInStr($q,",",0,3)-1)
$e=StringMid($q,StringInStr($q,",",0,4)+1)
Case 5
$a=StringMid($q,1,StringInStr($q,",",0,1)-1)
$b=StringMid($q,StringInStr($q,",",0,1)+1,StringInStr($q,",",0,2)-StringInStr($q,",",0,1)-1)
$c=StringMid($q,StringInStr($q,",",0,2)+1,StringInStr($q,",",0,3)-StringInStr($q,",",0,2)-1)
$d=StringMid($q,StringInStr($q,",",0,3)+1,StringInStr($q,",",0,4)-StringInStr($q,",",0,3)-1)
$e=StringMid($q,StringInStr($q,",",0,4)+1,StringInStr($q,",",0,5)-StringInStr($q,",",0,4)-1)
$f=StringMid($q,StringInStr($q,",",0,5)+1)
Case 6
$a=StringMid($q,1,StringInStr($q,",",0,1)-1)
$b=StringMid($q,StringInStr($q,",",0,1)+1,StringInStr($q,",",0,2)-StringInStr($q,",",0,1)-1)
$c=StringMid($q,StringInStr($q,",",0,2)+1,StringInStr($q,",",0,3)-StringInStr($q,",",0,2)-1)
$d=StringMid($q,StringInStr($q,",",0,3)+1,StringInStr($q,",",0,4)-StringInStr($q,",",0,3)-1)
$e=StringMid($q,StringInStr($q,",",0,4)+1,StringInStr($q,",",0,5)-StringInStr($q,",",0,4)-1)
$f=StringMid($q,StringInStr($q,",",0,5)+1,StringInStr($q,",",0,6)-StringInStr($q,",",0,5)-1)
$g=StringMid($q,StringInStr($q,",",0,6)+1)
Case 7
$a=StringMid($q,1,StringInStr($q,",",0,1)-1)
$b=StringMid($q,StringInStr($q,",",0,1)+1,StringInStr($q,",",0,2)-StringInStr($q,",",0,1)-1)
$c=StringMid($q,StringInStr($q,",",0,2)+1,StringInStr($q,",",0,3)-StringInStr($q,",",0,2)-1)
$d=StringMid($q,StringInStr($q,",",0,3)+1,StringInStr($q,",",0,4)-StringInStr($q,",",0,3)-1)
$e=StringMid($q,StringInStr($q,",",0,4)+1,StringInStr($q,",",0,5)-StringInStr($q,",",0,4)-1)
$f=StringMid($q,StringInStr($q,",",0,5)+1,StringInStr($q,",",0,6)-StringInStr($q,",",0,5)-1)
$g=StringMid($q,StringInStr($q,",",0,6)+1,StringInStr($q,",",0,7)-StringInStr($q,",",0,6)-1)
$h=StringMid($q,StringInStr($q,",",0,7)+1)
Case 8
$a=StringMid($q,1,StringInStr($q,",",0,1)-1)
$b=StringMid($q,StringInStr($q,",",0,1)+1,StringInStr($q,",",0,2)-StringInStr($q,",",0,1)-1)
$c=StringMid($q,StringInStr($q,",",0,2)+1,StringInStr($q,",",0,3)-StringInStr($q,",",0,2)-1)
$d=StringMid($q,StringInStr($q,",",0,3)+1,StringInStr($q,",",0,4)-StringInStr($q,",",0,3)-1)
$e=StringMid($q,StringInStr($q,",",0,4)+1,StringInStr($q,",",0,5)-StringInStr($q,",",0,4)-1)
$f=StringMid($q,StringInStr($q,",",0,5)+1,StringInStr($q,",",0,6)-StringInStr($q,",",0,5)-1)
$g=StringMid($q,StringInStr($q,",",0,6)+1,StringInStr($q,",",0,7)-StringInStr($q,",",0,6)-1)
$h=StringMid($q,StringInStr($q,",",0,7)+1,StringInStr($q,",",0,8)-StringInStr($q,",",0,7)-1)
$i=StringMid($q,StringInStr($q,",",0,8)+1)
EndSwitch
;MsgBox(0,"1",$a&" "&$b&" "&$c&" "&$d)
Switch $v
Case "RUN"
RUN ($a,$b,$c,$d)
Case "ControlClick"
ControlClick($a,$b,$c,$d)
Case "ControlDisable"
ControlDisable($a,$b,$c)
Case "ControlEnable"
ControlEnable($a,$b,$c)
Case "ControlFocus"
ControlFocus($a,$b,$c)
Case "ControlHide"
ControlHide($a,$b,$c)
Case "ControlListView"
ControlListView($a,$b,$c,$d,$e,$f)
Case "ControlMove"
ControlMove($a,$b,$c,$d,$e,$f,$g)
Case "ControlSend"
ControlSend($a,$b,$c,$d,$e)
Case "ControlSetText"
ControlSetText($a,$b,$c,$d,$e)
Case "ControlShow"
ControlShow($a,$b,$c)
Case "ControlTreeView"
ControlTreeView($a,$b,$c,$d,$e,$f)
Case "WinActivate"
WinActivate($a,$b)
Case "WinClose"
WinClose($a,$b)
Case "WinFlash"
WinFlash($a,$b,$c,$d)
Case "WinKill"
WinKill($a,$b)
Case "WinMenuSelectItem"
WinMenuSelectItem($a,$b,$c,$d,$e,$f,$g,$h,$i)
Case "WinMinimizeAll"
WinMinimizeAll()
Case "WinMinimizeAllUndo"
WinMinimizeAllUndo()
Case "WinMove"
WinMove($a,$b,$c,$d,$e,$f,$g)
Case "WinSetOnTop"
WinSetOnTop($a,$b,$c)
Case "WinSetState"
WinSetState($a,$b,$c)
Case "WinSetTitle"
WinSetTitle($a,$b,$c)
Case "WinSetTrans"
WinSetTrans($a,$b,$c)
Case "WinWait"
WinWait($a,$b,$c)
Case "WinWaitActive"
WinWaitActive($a,$b,$c)
Case "WinWaitClose"
WinWaitClose($a,$b,$c)
Case "WinWaitNotActive"
WinWaitNotActive($a,$b,$c)
Case "Send"
Send($a,$b)
Case "SendKeepActive"
SendKeepActive($a,$b)
Case "Sleep"
Sleep($a)
EndSwitch
EndFunc
无奈,正则表达式不过关=。=! |