How do I automate clicking a button in an application's window with AppleScript?
Fresh3 days ago
Mar 15, 202633451 viewsConfidence Score0%
0%
Problem
Let's say I want to click a button that appears somewhere within a window, using AppleScript. works, but you have to know which button exactly you want to press. For example: Scanning is a bit cumbersome when you always have to wait for the scanner to finish, then switch to Image Capture.app, then …
Error Output
tell application "System Events"
tell process "Image Capture"
click button "Scan" of window "Image Capture"
end tell
end tellUnverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How do I automate clicking a button in an application's window with AppleScript?
Low Risk
If the button is not available directly, you might have to guess. What works in High Sierra is: On older macOS releases, may have to be used. Another workaround would be to activate the window and press the space bar: You can actually try to near it…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix