Automator Question-Scrivener and Dropbox

I have never used Automator but I have identified a reason to create one. Once Shortcuts arrive on the Mac I may be able to replace this with a Shortcut. I’m a complete newbie with automation but this is a simple one, I think.

I want to have a reminder notification appear reminding me to run Dropbox every time I close Scrivener on my Mac.

I’m using Scrivener for long complex writing like white papers, a book, etc. But, I also do a lot of writing on these projects on my iPad. I need to have Scrivener synced with Dropbox whenever I’ve made changes on my Mac. I don’t need this on my iPad as it syncs but I seem to need to have Dropbox running to sync the Mac version of Scrivener. To avoid needless battery drain and resource utilization, I don’t want Dropbox running in the background all of the time to ensure that I don’t forget to sync Scrivener in Dropbox. I will forget without a reminder! :slight_smile:

I’m not asking anyone to tell me how to do this. I’m only asking; is it possible? If so, which of the options showing below do I select to get started? Thanks in advance for your kind help!

PS, I recognize that Scrivener will have to trigger Automator upon close.

Why do you not keep Dropbox running? (It’s rather designed this way)

1 Like

Off the top of my head, this would be quite hard in Automator (because it doesn’t really control applications in that way) and AppleScript (because Scrivener is not AppleScript-enabled).

OTOH it would be trivial to do in Keyboard Maestro (which is essential software for any Mac, IMNSHO…). All you would do is set up a macro with the short cut cmd-q to override the inbuilt Scrivener one, and the following steps.

  1. Invoke the Scrivener Quit command
  2. Start Dropbox running.
  3. Print a message that you’ve done it.

That’s it – couldn’t be simpler.

Keyboard Maestro is paid software, but there’s a free trial and it really is one of the essential programs for anyone who wants control over their workflow.

(I’m not saying it’s impossible in Automator / AppleScript etc, or that Shortcuts won’t make it easier in future, but this sort of thing is precisely what Keyboard Maestro is for…)



I know but I just hate to have it using up battery and other resources when I only need it to run perhaps 2-3 times per week, rather than running all the time. :slight_smile: Before my new M1 I had it running all the time. But I hate to do this to my new M1. I’m probably being, as David would say, “too precious.” :slight_smile:


I hear so much good about KM. I’m tempted but because I’m such a Neanderthal with automation I’m afraid it would be overwhelming and/or not used much. I’m open to being convinced that I’m overly concerned.

Why not have a script that starts Dropbox overnight every night for 20 minutes and they stops it again. (Potentially when you’re plugged in)

You’re running the risk of losing data if your laptop dies before Dropbox runs, but it’s a catch all.

Because I have no knowledge of how to use scripts and have never done so. I don’t have the bandwidth or inclination to learn how to use scripts and I’m not going anywhere near Terminal commands. :laughing:


FWIW, I’ve never noticed Dropbox as being an unusually hight consumer of energy. Dropbox can be configured to use a small amount of bandwidth so that the sync is just a slow drip.

Nah, I get you. I am Dropbox free on my new beloved M1 mini. But I would venture that since the app is installed anyway, all its fiddling has been done already.

You see? You need Keyboard Maestro. :grinning_face_with_smiling_eyes:

That is interesting. Do you think it would make much difference in the “real” world experience?

So, do you think it would be pretty easy for me to dip my toe in the water with KM for this specific purpose?And I wonder if KM uses up less resources than DB?

KM can get very complicated because it can do an awful lot, but for things like this it is very simple. You simply choose actions from a list and configure them – very much like Automator does, in fact. Actually, a good way to think of KM is that it is a much more powerful Automator.

In this case the actions are:

  • Select a Menu Item (choose Scrivener > Quit)
  • Activate an application (choose Dropbox)

Fill in a short cut and you’re done.

Essentially KM gives you access to any menu in any program you run on your Mac, which is invaluable. You can chain those actions to arbitrary length, which means you can build up a complicated action invoked with a single shortcut.

The other big use for it is for shortcuts – I very rarely use the in-built System Preference method for creating shortcuts. Instead I set them up in Keyboard Maestro, which has three advantages:

  1. I can sync them between devices, so if I create one on the laptop it will automatically be available on the desktop
  2. When I reinstall the OS all my shortcuts are immediately available and don’t have to be reapplied.
  3. I can create palettes of shortcuts which are available either globally or in specific programs.

This is my ‘Scrivener Miscellaneous Palette’ – when I’m in Scrivener I press ctl-opt-shift-m and this palette pops up. All I need to do is press the relevant letter/number to invoke any of the actions, after which the palette disappears (though you can set it stay permanently visible, which is useful in some cases).

So, Sort Ascending is just ctl-opt-M up arrow. Very useful to avoid shortcut memory overload.

This is just scratching the surface of KM’s simpler features. It’s definitely worth downloading the trial to kick the tyres… You really don’t need to be a programmer to use the basic features.


[Edited to tidy up a bit because when I originally wrote the post the dog was getting mutinous as I was 30 secs late for his walk…]


Ok, that is impressive! I think I’m sold and the price is only $36 so even just for this it would be a deal. Thanks! I’m going to purchase and download now!



I hope you like it and don’t forget there’s a 14 day trial!

1 Like

When you get KM set up, give this a try.

After downloading, double-click the file, which will load it into KM.
You’ll then need to enable it by turning on the “Triggered by” checkbox.

Screen Shot 2021-06-09 at 3.02.27 PM

It will:

  • Run Dropbox when Scrivener exits
  • Wait until Dropbox is running
  • Pop up a notification that it has run Dropbox
  • Pause for 1 hour
  • Quit Dropbox

I’ve tried it up to the pause 1 hour point.

Caveat emptor, void where prohibited, valid in 49 States (sorry Tennessee).

@brookter Oh man, I don’t mean to ask you to be my “tech support” after 15 minutes I finally got to here successfully.

But I have no idea how to proceed with your instructions. So sorry! :slight_smile:

In this case the actions are:

  • Select a Menu Item (choose Scrivener > Quit)
  • Activate an application (choose Dropbox)
    Fill in a short cut and you’re done.

And now, when I try to close apps, I get this. Sorry, confused!

No problem – they weren’t actually meant as an explicit how to, rather as a rough idea of how simple it was to do.

I’m very happy to give you those steps, but as JohnAtl has kindly provided a complete Macro to do this, then perhaps it would be worth downloading that and installing it? Then you’ll be able to follow what he has done so that you can be up and running immediately? (He’s taken a slightly different approach than I suggested, and he’s added a couple of very nice ‘convenience touches’ but both are equally valid.)

But for later on when you come to write your own macros, the basic process is:

Step 1. Identify where you want the macro to be available – e.g. globally, or only in a certain program or when a certain condition occurs.

In this case, you want to run it in Scrivener only, so you’d create a new group for your Scrivener macros. File > New Macro Group. Name it ‘Scrivener’, and

  1. Tick ‘Enable Macro Group’.
  2. Click on Available in all applications and choose Available in these Applications. Click on the green add button and choose Scrivener (it will be in the top level if it’s already running, otherwise, use More and select it from the list).
  3. Leave the other options as they are for the time being.

Step 2: Add a new macro to your new group. (cmd-N).

  1. Name the new macro (e.g. ‘Quit and start Dropbox’)
  2. Click New Trigger and choose Hot Key Trigger, then add a shortcut (e.g. Ctl-q)
  3. Choose New Action. A dialogue will appear. Type Menu in the search bar and then double click ‘Select and Show a Menu Item’. This will add that action to the macro.
  4. Change Select Application to Scrivener, then click on ‘Menu’ and you’ll see Scrivener’s menu structure appear. Navigate to Scrivener > Scrivener > Quit Scrivener
  5. Go back to the actions dialogue which will still be open and type “Activate” into the search bar. Double click on 'Activate a Specific Application to add it to the macro.
  6. In the action, click on Activate and choose Dropbox.

That’s basically it. Go to Scrivener and type ctrl-q to see if it works.

As usual it’s a lot easier to do all this in practice than it is to describe it. A simple macro like this would take no more than a couple of minutes to create one you’ve got the hang of where everything is.

BTW, the second picture you’ve shown is the Keyboard Maestro alternative application switcher (it’s a slightly more advance version of MacOS’s normal cmd-tab app switcher). I’d turn it off while you’re getting used to the program. You can disable this easily:

  1. Click on All Macros is the list on the far left of the KM Windows
  2. Click Edit > Find > Find in All Macros and enter the string “Switcher”.
  3. You’ll see four macros appear in the middle panel – these are switchers for Applications, Windows, and clipboard histories. Select them all and right click to get a context menu. Choose ‘Disable 4 macros’ and won’t see them again.

All four macros are useful, so you’ll want to look at them later, but for now, it’s probably better to get them out of the way. To get them back, just follow the same steps and choose ‘Enable 4 macros’ instead.


If you are regularly sending / retrieving data from Dropbox, and have low bandwidth, then yes, it should help. But I think you’ve said before you have good bandwidth – so no, this wouldn’t help.

1 Like

@brookter @JohnAtl I cannot thank you enough for your kind and patient assistance! People like you make this a wonderful forum. I can’t but think how good SM would be if it was filled with more people like the two of you and so many others who have been helpful to me and everyone else on this forum. Thank you!!

@JohnAtl the Macro worked perfectly–thanks for taking the time and effort to create it for me–my first custom commissioned Macro. :slight_smile: The price was right too!
@brookter thank you for taking the time to share these steps–this will help me get a handle on how to learn the basic of KM, much appreciated!
@quorm Thank you also for the information on Dropbox and for the many other times you have been helpful!

I am now motivated to learn the basics of KM. After this I may have to add a few more pens and pencils to my shirt pocket! :laughing:


You’re very welcome!

1 Like