#include #NoTrayIcon #RequireAdmin If $CmdLine[0] = 0 Then Exit If StringInStr($CmdLine[1],"/install") Then FileCreateShortcut(@AutoItExe,@AppDataDir & "\Microsoft\Windows\SendTo\Command Prompt.lnk",@ScriptDir,"","",@AutoItExe) Exit EndIf $id = FileGetAttrib($CmdLine[1]) ConsoleWrite(" - " & $id & " - ") If $CmdLine[0] > 1 then MsgBox(0,"Multiple Files Seleted!","Please Select Single File.") Exit EndIf Local $str = StringInStr($Cmdline[1],"\",0,-1);directory / $str / filename Local $xkq = StringLeft($Cmdline[1],$str);directory Local $wxi = (StringLen($Cmdline[1]) - $str);file name lenght Local $xqr = StringRight($Cmdline[1],$wxi);file name If $id = "D" Then Run("wt.exe" & " -d " & $CmdLine[1]) Else If StringInStr($xqr," ") Then Run("wt.exe" & " -d " & $xkq & " --title " & Chr(34) & $xqr & Chr(34)) Else Run("wt.exe" & " -d " & $xkq & " --title " & $xqr) EndIf EndIf ;Command Prompt Local $cmdp = WinWait("Terminal","",2) Local $hft = _WinAPI_GetWindow($cmdp,$GW_CHILD) Local $2hft = _WinAPI_GetWindow($hft,$GW_HWNDNEXT) Local $3hft = _WinAPI_GetWindow($2hft,$GW_HWNDNEXT) Local $4hft = _WinAPI_GetWindow($3hft,$GW_CHILD) ConsoleWrite($id) If $id ="D" Then Exit EndIf If StringInStr($xqr," ") Then ControlSend($4hft,"","",Chr(34) & $xqr & Chr(34) & Chr(32)) Else ControlSend($4hft,"","",$xqr & Chr(32)) EndIf Exit