juechafun/05-原子化笔记本/物联实验室-清理红外指令.md
2026-01-15 10:01:16 +08:00

27 lines
514 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#领域/工具技巧
## 一句话描述
[__批量生成红外清理CMD指令______]
## 核心定义
修改参数设置 `IP``ids` 后运行程序直接复制所有行在CMD命令窗口右键粘贴
## 最小实现代码
```python
# ######## 参数设置 ########
IP = "192.168.1.180"
ids = []
ids.extend(range(3, 39))
# #########################
for id in ids:
    code = """curl -X POST http://""" + IP + """/v3 -d "{\\"ir"""
    code += str(id)
    code += '\\":0}"'
    print(code)
```