You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 粘贴#[command]pubasyncfnpaste<R:Runtime>(app_handle:AppHandle<R>,window:WebviewWindow<R>){set_macos_panel(&app_handle,&window,MacOSPanelStatus::Resign);
std::thread::sleep(std::time::Duration::from_millis(150));// 使用更详细的 AppleScriptlet script = r#"tell application "System Events" -- 获取当前激活的应用 set frontApp to name of first application process whose frontmost is true -- 确保有足够的时间让应用获得焦点 delay 0.15 -- 检查剪贴板是否准备好 if frontApp is not "" then tell process frontApp -- 执行粘贴 keystroke "v" using command down -- 给粘贴操作一些时间 delay 0.1 return "Paste completed in " & frontApp end tell else return "No active application found" end ifend tell"#;Command::new("osascript").args(["-e", script]).output().expect("failed to execute process");}
Describe the bug
Reproduction
No response
Expected behavior
No response
Software Information
Additional context
No response
The text was updated successfully, but these errors were encountered: