juechafun/03-资源/执行脚本-工具技巧-USTONE清理红外指令.md

35 lines
519 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.

---
#领域/工具技巧
#复盘/5
## 一句话描述
[____批量生成红外清理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)
```