Welcome to the new Box Support website. Check out all the details here on what’s changed.

Copy box link from applescript or bash script?

New post

Comments

1 comment

  • chaosworks

    I would love to know this also as then I can use Hammerspoon to copy the link to the pasteboard for sending in chat. Even better would be a Screenshots directory and support in Box. This is as far as I've gotten. Might be possible to call into AppleScript to do some context menu clicking but ugh.

     

    boxPath = os.getenv("HOME") .. "/Box"
    if hs.fs.displayName(boxPath) ~= nil then
      boxScreenshotsPath = boxPath .. "/Screenshots"
      if hs.fs.displayName(boxScreenshotsPath) == nil then
        os.execute("mkdir " .. boxScreenshotsPath)
      end
      hs.execute("defaults write com.apple.screencapture location " .. boxScreenshotsPath)
      function openScreenshots(files)
        hs.execute("open " .. boxScreenshotsPath)
      end
      hs.pathwatcher.new(boxScreenshotsPath, openScreenshots):start()
    end
    0
    Comment actions Permalink

Please sign in to leave a comment.