# ยินดีต้อนรับสคริปต์ มีสวิตช์ของ IDM ให้ใช้

VDM takes IDM's command-line switches, so scripts written for IDM can hand it their downloads. A separate tool downloads in a terminal, and a local API lets other programs see and control the running app.

**Command line** Volt Download Manager

- ในแอป: `voltdownloadmanager-cli`, in VDM's folder
- ตั้งแต่: [เวอร์ชัน 0.1.0](https://vdm.mikaillab.com/th/news.html#v0.1.0) และใหม่กว่า
- จัดส่ง: ฟรี
- คู่มือฉบับเต็ม: [ดูทีละขั้นตอนในวิธีใช้](https://vdm.mikaillab.com/th/help/command-line.html)

## สวิตช์ของ IDM ที่ไม่เปลี่ยนแปลง

The app understands the same switches as IDM: `/d` for the address, `/p` for the folder, `/f` for the file name, `/a` to queue it without starting, `/n` to skip the **Download File Info** window, and `/s` to start the main download queue. A batch file or another program that drives IDM this way can drive VDM by changing the program's name.

```
voltdownloadmanager.exe /d https://example.com/files/report.pdf /p D:\Reports /n
```

If VDM is running, the command goes to it; if not, VDM starts and carries it out. On macOS and Linux the program has the same name, without `.exe`.

## ตัวดาวน์โหลดสำหรับเทอร์มินัล

`voltdownloadmanager-cli` comes with every download of VDM and works without the app running. `get` downloads a file over several connections with a progress line, **Ctrl+C** pauses it and `resume` carries on later. `video-get` downloads a video, and `torrent-get` a torrent or only some of its files. `video-info` and `torrent-info` say what there is to choose before you download. `voltdownloadmanager-cli help <command>` lists every option, and a command that fails exits with code 1.

## JSON สำหรับสคริปต์และโปรแกรม

เมื่อใช้ `--json` ทุกคำสั่งจะพิมพ์ JSON หนึ่งออบเจกต์ต่อบรรทัด: บรรทัดความคืบหน้าทุกครึ่งวินาทีขณะดาวน์โหลดไฟล์ จากนั้นเป็นพาธ ขนาด และเวลาเมื่อเสร็จสิ้น ขนาดเป็นไบต์ ความเร็วเป็นไบต์ต่อวินาที และหากล้มเหลวจะพิมพ์ออบเจกต์ข้อผิดพลาด เพื่อให้สคริปต์หรือเอเจนต์ AI อ่านผลลัพธ์ได้โดยไม่ต้องแยกวิเคราะห์ข้อความ [รูปแบบ](https://vdm.mikaillab.com/th/help/command-line.html#json-for-scripts-and-programs) จะแสดงเป็นคำสั่งต่อคำสั่ง

## API สำหรับแอปที่กำลังทำงานอยู่

โปรแกรมอื่น ๆ สามารถขอข้อมูลการดาวน์โหลดจากแอปที่กำลังทำงานอยู่ได้ในรูปแบบ JSON และสามารถหยุดชั่วคราว เริ่ม ลบ หรือลบการดาวน์โหลดได้ โปรแกรมเหล่านี้เชื่อมต่อกับพอร์ตบนคอมพิวเตอร์เครื่องนี้เท่านั้น ด้วยโทเค็นลับที่เปลี่ยนไปทุกครั้งที่เริ่มทำงาน และมีเพียงโปรแกรมของคุณเองเท่านั้นที่อ่านได้ API จะปิดอยู่จนกว่าคุณจะเปิดใช้งานด้วย `voltdownloadmanager-cli api on` และ `status`, `pause`, `start`, `remove` และ `delete` ใช้ API นี้จากบรรทัดคำสั่ง

Every request and answer is described field by field in a [JSON Schema](https://vdm.mikaillab.com/automation-api.schema.json), made from the code the app answers with, so programs can check what they send or generate their types from it. AI assistants use the same API through VDM's [MCP server](https://vdm.mikaillab.com/th/features/ai-assistants.html).

## สคริปต์เพิ่มเติม

`playlist-get`ดาวน์โหลดวิดีโอของเพลย์ลิสต์หรือช่อง และ `gallery-get` ดาวน์โหลดแกลเลอรีรูปภาพ `get` รองรับการเชื่อมต่อสูงสุด 128 รายการด้วย `-c`, `--dns` เพื่อเลือกผู้ที่แปลงชื่อเป็นที่อยู่ และ `--adapter` เพื่อส่งการดาวน์โหลดผ่านอะแดปเตอร์เครือข่ายเดียวหรือไม่ส่งเลย `/startup` ของแอปจะเริ่มทำงานแบบซ่อนอยู่ในพื้นที่แจ้งเตือน รายการของ API ยังให้คิว หมวดหมู่ และพื้นที่ว่าง และยังสามารถเริ่มและหยุดคิวตามชื่อได้

## เพิ่มเติมในแอป

- [พื้นที่แจ้งเตือน](https://vdm.mikaillab.com/th/features/tray.html)
- [ชุดรูปแบบ](https://vdm.mikaillab.com/th/themes.html)
- [รายงานข้อขัดข้อง](https://vdm.mikaillab.com/th/features/crash-reports.html)
- [87 ภาษา](https://vdm.mikaillab.com/th/features/languages.html)
- [Windows, Mac และ Linux](https://vdm.mikaillab.com/th/features/systems.html)
- [การเข้าถึง](https://vdm.mikaillab.com/th/features/accessibility.html)
- [ผู้ช่วย AI](https://vdm.mikaillab.com/th/features/ai-assistants.html)
- [ทุกคุณสมบัติ](https://vdm.mikaillab.com/th/features/)

[แก้ไขหน้านี้บน GitHub](https://github.com/mikailhossenimran/voltdownloadmanager/edit/main/website/content/features/command-line.md) [รายงานปัญหาเกี่ยวกับหน้านี้](https://github.com/mikailhossenimran/voltdownloadmanager/issues/new?template=website.yml&title=Website%3A%20Command%20line&page=https%3A//vdm.mikaillab.com/features/command-line.html) [ประวัติหน้า](https://github.com/mikailhossenimran/voltdownloadmanager/commits/main/website/content/features/command-line.md)

ฟรี, โอเพนซอร์ส, ไม่มีโฆษณา, ไม่มีช่วงทดลองใช้

[Download Volt Download Manager](https://vdm.mikaillab.com/th/download.html)
