Re: Unable to target a specific UI element in Preview.app
Re: Unable to target a specific UI element in Preview.app
- Subject: Re: Unable to target a specific UI element in Preview.app
- From: Axel Luttgens <email@hidden>
- Date: Sun, 17 Apr 2016 09:49:46 +0200
> Le 15 avr. 2016 à 02:49, quark67 a écrit :
>
> I want to click in the text field of a password-protected PDF by GUI scripting.
> <PastedGraphic-1.png>
>
> […]
>
> Despite this, is there a way to target the secure text field or not ? Thanks.
>
> […]
Hello,
Assuming the protected document is opened in Preview’s front window, this one works here (Yosemite 10.10.5):
tell application "Preview" to activate
delay 1
tell application "System Events"
tell application process "Preview"
tell front window
tell splitter group 1
tell text field 1
set focused to true
set value to "test"
end tell
end tell
end tell
keystroke return
end tell
end tell
The (quite generous) delay allows all UI elements to be in place, should Preview need to be brought to front when above snippet is run.
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden