• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
DropBox Toggle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DropBox Toggle


  • Subject: DropBox Toggle
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 02 Oct 2012 00:57:33 -0500

Hey Folks,

I'm a latecomer to DropBox.  I didn't really have much use for it until I started sending movie files while beta-testing various products and then doing likewise for the occasional tutorial.  DropBox has made this task much simpler for me, and I'm grateful.

However.  They've now changed the menu applet so you have to go through its preferences to quit it instead of simply being able to do so from the menu itself, and I don't like that a bit.  (Unlike many I only run it when needed.)

So I wrote a simple toggle script to launch/quit it and open my public folder in the Finder when appropriate.

--
Best Regards,
Chris

------------------------------------------------------------------------------------------------
#       Author: Christopher Stone <email@hidden>
#      Created: 2012-09-28 : 21:51
#     Modified: 2012-10-02 : 00:32
#  Application: Dropbox
#      Purpose: Toggle Launch/Quit because DB can no longer be quit from its menu.
# Dependencies: Only OSX components used.
#      Version: 1.0
------------------------------------------------------------------------------------------------

try

  

  set dbRunning to do shell script "ps auxc | sed -n '/Dropbox/p'"
  considering case
    if dbRunning ends with "Dropbox" then
      tell application "Dropbox" to quit
    else
      set dropBoxPublicFldr to alias ("" & (path to home folder) & "Dropbox:Public:")
      tell application "Dropbox" to launch
      tell application "Finder"
        open dropBoxPublicFldr
        if bounds of front window ≠ {0, 44, 844, 1196} then
          set bounds of front window to {0, 44, 844, 1196}
        end if
      end tell
    end if
  end considering

  

on error e number n
  set e to e & return & return & "Num: " & n
  tell me to set dDlg to display dialog e with title "ERROR!" buttons {"Cancel", "Copy", "OK"} default button "OK"
  if button returned of dDlg = "Copy" then set the clipboard to e
end try

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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Referencing a Message in Mail 6.1 - Huh?
  • Next by Date: Re: Referencing a Message in Mail 6.1 - Huh?
  • Previous by thread: Re: Referencing a Message in Mail 6.1 - Huh?
  • Next by thread: Quoting URLs for the Shell
  • Index(es):
    • Date
    • Thread