Fri Aug 02, 2013 6:38 am Post
Fri Aug 02, 2013 9:39 am Post
Code: Select all
dropbox stop
scrivener
dropbox start
Fri Aug 02, 2013 2:12 pm Post
Fri Aug 02, 2013 2:38 pm Post
Gordon Robb wrote:OK, mister script guyI know you're stating this like it's an easy thing but...
what do you mean save this as a script and just run it? (Windows i'm talking about)
Fri Aug 02, 2013 4:09 pm Post
Mex5150 wrote:Hi All
Turns out the script was far easier than I though it would be:I'm afraid you Mac guys are on your own thoug I know next to nothing about your OS LOL <sorry>Code: Select all
dropbox stop
scrivener
dropbox start
Wed Aug 21, 2013 9:51 am Post
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>info.stovell.DropboxAutoStopForScrivener</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>sleep 1; runningJobs=$(launchctl list); if [[ $runningJobs == *"com.literatureandlatte.scrivener2"* && $runningJobs == *"com.getdropbox.dropbox"* ]]; then osascript -e "tell application id \"com.getdropbox.dropbox\" to quit"; touch /tmp/DropboxShouldStart_$UID; elif [[ $runningJobs != *"com.literatureandlatte.scrivener2"* && $runningJobs != *"com.getdropbox.dropbox"* && -e /tmp/DropboxShouldStart_$UID ]]; then open -b com.getdropbox.dropbox; rm /tmp/DropboxShouldStart_$UID; elif [[ $runningJobs == *"com.getdropbox.dropbox"* ]]; then rm /tmp/DropboxShouldStart_$UID; fi</string>
</array>
<key>WatchPaths</key>
<array>
<string>~/Library/Caches/com.literatureandlatte.scrivener2</string>
</array>
</dict>
</plist>
Code: Select all
~/Library/LaunchAgents
Code: Select all
info.stovell.DropboxAutoStopForScrivener.plist
Code: Select all
~
Thu Aug 22, 2013 4:25 am Post
jstovell wrote:Glad to. I'm always happy to find ways to procrastinate... er, to help others.
Sat Apr 05, 2014 8:28 pm Post
jstovell wrote:For those who want something more robust than a Keyboard Maestro script, it is possible to make OS X take care of this for you automatically by using a launch agent.
In total there are 8 users online :: 1 registered, 0 hidden and 7 guests (based on users active over the past 5 minutes)
Most users ever online was 1048 on Mon Feb 06, 2012 9:07 pm
Users browsing this forum: devinganger and 7 guests