Jump to content

MarcG

Member
  • Posts

    8
  • Joined

  • Last visited

Posts posted by MarcG

  1. 7 minutes ago, vitor said:

    @MarcG Seems like the utility is still the same. Since your error is somewhat bizarre, this looks like an oddity in your personal setup. Just to get more data, what’s the result of: /usr/sbin/screencapture -i -P '/tmp/test.png'?

     

    I prefer to think of it more as special, rather than odd!

     

    Separating the -iP solves it, I don't need the path, and the temp filename works.

     

    So I'm using: screencapture -i -P "$(mktemp).png"

     

    Can't begin to tell you how much time this, and one simple text replacement is going to save me. Thank you.

  2. Okay, the issue is pretty obvious...

     

    Quote

    [2018-05-18 11:28:21][ERROR: action.script] /Users/marcgoldman/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/81226899-3A6C-4671-A0C7-7147A39F74CC: line 1: screencapture: command not found

     

    I've tried updating it to /usr/sbin/screencapture but that didn't help.

     

    If I run it in terminal, I get a command not found, but if I just run screencapture with no parameters, it does find it, as the error is then that no filename is specified.

     

    Quote

    MacBook-Pro-3:~ marcgoldman$ screencapture -iP "$(mktemp).png"

    -bash: screencapture: command not found

    MacBook-Pro-3:~ marcgoldman$ screencapture

    screencapture: no file specified

    MacBook-Pro-3:~ marcgoldman$ 

     

    Latest Alfred and OSX 10.13.4

  3. 32 minutes ago, vitor said:

    screencapture, which comes with macOS, is surprisingly capable (man screencapture) and can do it in a single command:

    
    screencapture -iP "$(mktemp).png"
    • i is to capture interactively (i.e., the same as ⌘⇧4).
    • P is to open the image in Preview after it’s done.
    • "$(mktemp).png" is a temporary file to store the screenshot, which screencapture needs.

     

    Add that in a Run Script Action connect by a Hotkey Trigger, and you’re set. Here’s a ready-made Workflow.

     

    It's painful being a newbie, sorry...

     

    So, all I need to do is import that workflow, set the hotkey and it should work? 

     

    I tried to do that (cmd+ctrl+shift+1) and nothing happens when I hit the hotkey sequence. So I need to activate it in some way or give some permission in Alfred like I did to make text replacement work?

  4. I've just found/bought Alfred mainly to help me save time entering text I have to repeat many times a day but looking deeper into the site it seems there is a world of possibilities out there.

     

    One thing I do a lot is take a screenshot (using cmd+ctrl+shift+4) to the clipboard, open preview, go to the file menu and then create a new image from the clipboard. It's not a hard process, but it's done enough to be annoying.

     

    Is it possible to automate that, so I can initiate a screenshot and as soon as it's done it opens it in Preview?

     

    And if it is, could you help, or at least point me down the road on how to achieve it.

     

    Many thanks!

×
×
  • Create New...