Set objArgs = WScript.Arguments Set Wshell = WScript.CreateObject("WScript.Shell") dim s(),sP,ds For I = 0 to objArgs.Count - 1 redim Preserve s(i) s(I)=objArgs(I) sp=sp & I & ": " & s(i) & vbcrlf ds=ds&i &"," Next sp=sp & vbcrlf & "結合する順番を指定してください" sp=sp & vbcrlf & "例:0,1,2," sp=sp & Vbcrlf & "(カンマで区切って順番を入力)" sp=sp & Vbcrlf & "(最後の値の後ろにもカンマつける)" d=inputbox(sp,"RMjoint:結合順序の指定",ds) if d<>"" then v="" istr="" for i=1 to len(d)+1 if mid(d,i,1)="," then istr=istr & " -i " & s(v) v="" else v=v & mid(d,i,1) end if next msgbox "instr=" & istr ostr="" for i=1 to len(s(0)) if mid(s(0),i,1)="." then ostr=ostr & "_out.rm" exit for else ostr=ostr & mid(s(0),i,1) end if next ostr=inputbox("出力先を指定してください","出力ファイルの指定",ostr) if ostr<>"" then cmd_str="C:\Progra~1\Real\RealPr~1\rmeditor.exe" & istr & " -o " & ostr r=Wshell.run (cmd_str,0,true) if r=0 then msgbox ostr & "に出力されました" else msgbox "ファイル結合に失敗しました" end if end if end if