hello
February 5, 2021, 7:54pm
1
Similar to Zabobon's thread:
Yes. Try this:
Preview: Change markup text size.kmmacros (3.2 KB)
[Screen Shot 2021-02-05 at 16.51.09-pty-fs8]
Script as text:
tell application id "com.stairways.keyboardmaestro.engine"
set inst to system attribute "KMINSTANCE"
set textSize to (getvariable "Local Text Size" instance inst) --as number
end tell
tell application "System Events"
tell application process "Preview"
tell first window
tell (first toolbar whose description is "toolbar")
if value of (…
Any tips on how to make Preview.app:
Open selected image in Finder
Activate Markup
In markup toolbar, activate the Pen tool?
Calling AppleScript masters.
Thanks.
EDIT:
Answering myself, this worked:
found this thread in StackOverflow:
preview
Script works in Catalina:
tell application "System Events" to tell process "Preview"
activate
set markup to checkbox 1 of toolbar 1 of window 1
tell markup
if not (its value as boolean) then
click markup
delay 0.5
end if
end tell
set sketch to checkbox 1 of toolbar 2 of window 1
tell sketch
if not (its value as boolean) then
click sketch
end if
end tell
end tell
Great solution. I confirmed it works.
Here is the macro file in case anyone is interested.
Preview: Open Selected File and Markup with Pen.kmmacros (2.9 KB)
This is great! I usually annotate images with my iPad.
I press the spacebar, and then I click on the Markup. After that I have my image on my iPad, ready to edit.
Is it possible to do that with a hotkey?