暂且认为你想转化vbs吧,判断数字那里不完全对路,自己修改,au3的inputbox返回值为字符串,所以。。。 
 
Dim $lanpor
Dim $pcs, $bstart, $bstep, $tstart, $tstep
Dim $a, $c, $e
$lanpor = ObjCreate("wscript.Shell")
$pcs = InputBox("pieces", "", "5")
$bstart = InputBox("start1", "", "5")
$bstep = InputBox("step1", "", "5")
$tstart = InputBox("start2", "", "5")
$tstep = InputBox("step2", "", "5")
If Number($pcs) = False Or Number($bstart) = False Or Number($bstep) = False Or Number($tstart) = False Or Number($tstep) = False Then
        MsgBox(16, "你輸入的內容包含非整數,請重新輸入", "錯誤")
Else
        Sleep(200)
        $lanpor.sendkeys("{DOWN}")
        $lanpor.sendkeys("{TAB}")
        $lanpor.sendkeys($pcs)
        Sleep(200)
        $lanpor.sendkeys("{TAB 3}")
        Sleep(20)
        $a = $a + 1
        $bs = $bstart + ($a - 1) * $bstep
        $lanpor.sendkeys($bs)
        Sleep(20)
        If $bs = $bstart + ($pcs - 1) * $bstep Then
                $lanpor.sendkeys("{RIGHT}")
                $b = $pcs
                $be = $bstep * $b
                $lanpor.sendkeys($be)
                Sleep(20)
                $b = $b - 1
                If $b = 0 Then
                        $lanpor.sendkeys("{RIGHT}")
                        $c = $c + 1
                        $ts = $tstart + ($c - 1) * $tstep
                        $lanpor.sendkeys($ts)
                        Sleep(20)
                        If $ts = $tstart + ($pcs - 1) * $tstep Then
                                $lanpor.sendkeys("{RIGHT}")
                                $d = $pcs
                                $te = $tstart + $d * $tstep - 1
                                $lanpor.sendkeys($te)
                                Sleep(20)
                                $d = $d - 1
                                If $d = 0 Then
                                        $lanpor.sendkeys("{RIGHT}")
                                        $e = $e + 1
                                        $lanpor.sendkeys("20")
                                        Sleep(20)
                                        If $e - $pcs = 0 Then
                                                MsgBox(48, "任务完成", "DONE")
                                        EndIf
                                        $lanpor.sendkeys("{DOWN}")
                                EndIf
                                $lanpor.sendkeys("{UP}")
                        EndIf
                        $lanpor.sendkeys("{DOWN}")
                EndIf
                $lanpor.sendkeys("{UP}")
        EndIf
        $lanpor.sendkeys("{DOWN}")
EndIf
  |