Scrivener Scratchpad - trying to click on Send to Project... button / drop down list

I was wondering if anyone has an idea on how to click on the Send to Project... button / drop down list of the Scrivener Scratchpad.

The problem is that the Scrivener Scratchpad is more or less and app. it can be opened as a floating window with the ⇧⌘ Enter hotkey floating on top of any app. A partial window opens up from the right side of the screen.

The only thing that I can ascertain is that the window title is Scrivener Scratchpad.

What I tried and does not work-

  • Press Send to Project... in Scrivener Scratchpad window.
  • click at found image in Scrivener Scratchpad window.
  • click at found image anywhere
  • scripting using UI Browser

thanks in advance for your time and help

image

Hi @ronald,

Click at Found Image works for me. I tested on my computer.
Not sure if it was your issue, the drop down icon changes a bit when the Scratchpad window switches from the front to not the front.
When it is the front window, the down arrow has the blue background color, as shown in your OP.

I did not include this icon when I did the screenshot for the image.

Click at Found Image - ScracthPad.kmmacros (6.7 KB)

1 Like

works perfectly. thanks very much. When I included the arrow it did not work.
Do you have any ideas about how one would send to Scrivener doc to the scratchpad ?

Sorry to bother you again.

I am trying to create a Scrivener Scratchpad group palette, active only when the Scrivener scratchpad is displayed.

I tried to define it as below but it does not work. Would you have any ideas ?
thanks again

image

Sorry. I've never used Scratchpad. I don't know how.

This only works when the "Scrivener Scratchpad" is the front "focused" window. The only solution I can think of is to use the Condition action:

1 Like

once again thanks very much !! your help is greatly appreciated

Hey @ronald,

This is a relatively straightforward UI-Scripting problem (see appended AppleScript).

I can only guarantee it works with Scrivener 3 on macOS 10.12.6 though.


That fails, because Keyboard Maestro can't see the floating window.

-Chris

--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2021/01/13 18:13
# dMod: 2021/01/13 18:13 
# Appl: Scrivener, System Events
# Task: Access Scrivener Scratchpad's “Send to Project” Button.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Scrivener, @System_Events, @Access, @Scrivener, @Scratchpad, @Send-To-Project”, @Button
# Test: Only with Scrivener 3.0 on macOS 10.12.6.
# Vers: 1.00
--------------------------------------------------------

tell application "System Events"
   tell application process "Scrivener"
      if exists of window "Scrivener Scratchpad" then
         
         tell window "Scrivener Scratchpad"
            perform action "AXRaise"
            
            tell menu button "Send to Project..."
               perform action "AXShowMenu"
            end tell
            
         end tell
         
      end if
   end tell
end tell

--------------------------------------------------------

thank you Chris for your answer.
on 10.15.7 the script does not work as in nothing happens, whether the scratchpad is in focus or not. I had tried a similar script with UI Browser.
The only reliable solution I could find was that suggested by @martin

Hey @ronald,

Well crud.

I probably won't have my hands on Big Sur for a while, so I can't test this myself.

-Chris