I use Scrivener, and have succeeded with a few mostly mouse based macro. but since I experience some curious results sometime, I wonder if it is possible to call/ address sub-options as in such a dropdown window.
The window "Paragraph Indents" is evoke by hotkey: option command '.
And I would like to set the specific value for 'First line' and 'Left' and 'Right'
Is it possible? and then how do I do it?
Wauw, looks like I have gotten a true Swiss Armyknife, with KeyboardMaestro. Lots of possibilities. I dare not look into apple scripts too... you know suddenly you find yourself way off original focus. but I will keep in mind.
As of now 2 macros are working fine, one to go. (hit by the fact that deep in Scrivener there is one 'OK-button' not responding to 'Enter' so this one must be mouse clicked) ... I will persist and ind the end it WILL work
It is reassuring that members of this group (you) responds, Thank you so much.
GreyT
The little persistent nag for me is that, by "tabbing" from input field to input field, and ALWAYS ending up in the 'top' field my keyboard entries, will land correct.... BUT if I for some reason use same function/ screen from inside the original app (scrivener) I may forget to return cursor to that field, and then the sequence goes haywire. It takes discipline, and sometimes I am just eager....
This looks intriguing... do I understand you correctly that I capture as picture to be recognised the word "Right" and then somehow determine how many steps to the right I need to end up in data field!
Never done that... is there a practical way to determine 'distance'? how many mm will an increment of 1 be?
I am amazed by all these possibilities for automation. And the few ones I have made is really freeing my fingers.... and the head spins in between.
just realised that your example is an actual macro and not only a screenshot
wauw... I'll look at it tomorrow
You want to capture more than just the word, because you need the uniqueness of the word on the colored background for the image-to-find.
I also made the image fairly wide, so my offset (in pixels) to the right wouldn't have to be too much.
Here's another macro where I've made the image even more unique, and I've specified that Keyboard Maestro search only in the front window for the image.
It's a bit faster and more robust.
As for screen measurements – I like this little app:
It will die after Mojave, because it's a 32-Bit app – but I'll keep using it until then. (Although I haven't seen how well it works on a Retina screen – yet.)
A simple way of figuring out where the action is clicking is:
Change the action to Just Move instead of click.
Disable other actions in your macro.
Run the macro with the Scrivener Tabs and Indents... sheet open, and WATCH where the cursor moves -- you can then adjust as necessary.
ref: the Click at (xxx,yyy) part. I have discovered the benefit of "Go" and "Get" buttons, and the benefit of pointing to best/ correct window... sort of. I have also managed to grab and save Image, but I am still to succeed to point the correct offset from that Image! Thought I could use "Get" but then it became relative to window not Image.
A question: what is the difference by checking the box "Display" (or not).
Another question: Once I have captured an Image and saved it into the small area, can I let the system locate it on my screen?
When I run my macro (it fails in some connection to image) I can read the log but not really getting the message. I know there is a step by step debug option, but that does not make it clearer, for me.
Anyway. As it is now my macro's are working. Provided I keep my windows positions stable.
I am sure that I will get more understanding and knowledge "As time goes by"... and it takes lots of coffee
One more thing
At unexpected times, the macros went wild, that is, resulting click went astray.
In the end, after debugging, I realised that the "return home" clicks to main document in scrivener better be placed OUTSIDE the text area... turned out that som text being pasted had links that happen to fit the randomly placed returnpoint.
after I moved this point into the margin area, all goes to plan, again
GreyT
“Display” causes Keyboard Maestro to highlight the found image, so you can see what Keyboard Maestro sees.
Use it while developing and debugging your macro. Turn it off after you have a production macro.
Yes, but it's a good idea to HIDE the Keyboard Maestro Editor, because under some circumstances the macro will find the image in the image-well in addition to the image you want it to find.
I would think “return home” would better be done with a Bring Window to Front action, instead of a Click action.
In this particular macro you shouldn't have to do anything but dismiss the Paragraphs & Tabs sheet to return to the window you were working in – unless of course you've changed something.
Success
Based on your input and input from Scrivener Support + true male persistence, I have managed to build macros that are not depending on specific placement of Scrivener window.
They are based almost solely on key-input, among such as found at "Navigate-Inspect-Notes” and "Navigate-Move focus to-Editor"
Except the two click-instances where I finally could define an “Image” and determine where the “click” should land.
This last part took some trial-and-errors… until I observed that when you click the ‘Go’ button and the image is found, the mousecursor is placed relative to the values you have entered into the ‘right’ and ‘down’ fields. I failed umpteen times because I used the ‘Get’ button. The manual for KM does not specify this, really, not what I have found. But now I know. An the macro’s work ‘all over the screen’
Congratulations! I can see that you received a lot of good help here.
Please post your final macros here so that others can benefit.
If one of the above posts solves your problem/question as originally stated, please check the "Solved" checkbox (click for details) at the bottom of that post.
Otherwise, please post your remaining questions/issues about this problem.
If you have other questions, please start a new topic.
This last macro #4 is short but practical to get the Synopsis entered into Scrivener.
It uses a standard mouseclick, buy since the "Font-box" always sits in the same place at the lower righthand corner it is not depending on the placement of your Scrivener window:
Just updated to Mojave, works ok, then I experienced a number of times that this macro "3_NYT..." aborted during the last part when "using found image.."
Turned out that sometimes the window containing the image would be floating over some dark background and therefore not fit the pattern of expect image. This I could not control, but since the macro uses a similar approach in the start, which will alway float over a nonchanging part of the screen I used this image instead and adjusted the distance to my target button.
Now it is stable again