[dependencies]
arboard = "2.0"
use arboard::Clipboard;
fn main() {
loop{
// 创建一个剪切板实例
let mut clipboard = Clipboard::new().expect("Failed to create clipboard instance");
// 获取剪切板内容
match clipboard.get_text() {
Ok(text) => println!("Clipboard content: {}", text),
Err(err) => eprintln!("Failed to get clipboard content: {}", err),
}
use std::thread::sleep;
use std::time::Duration;
//std::thread::sleep(Duration::from_millis(1000);
std::thread::sleep(Duration::from_secs(1));
}
}
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询