Jump to content

tomvo

Member
  • Posts

    7
  • Joined

  • Last visited

Posts posted by tomvo

  1. well I was hoping to based on the contenttype of the clipboard dynamically maybe trigger a script like this

    Ideally there is a way to have the variables come from alfred

     

    folder=$(pwd)
    filename="Screen Shot $(date +%Y-%m-%d\ at\ %H.%M.%S).png"
     
    if [ $# -ne 0 ]; then
    if [[ -d $1 ]]; then
    if [ "$1" != "." ]; then folder=$1; fi
    else
    a=$(dirname "$1")
    b=$(basename "$1" .png)
     
    if [ "$b" != "" ]; then filename=$b.png; fi
     
    if [ "$a" != "." ]; then folder=$a; fi
    fi
    fi
     
    osascript -e "tell application \"System Events\" to ¬
    write (the clipboard as «class PNGf») to ¬
    (make new file at folder \"$folder\" ¬
    with properties {name:\"$filename\"})"
  2. I want to create a workflow where there are 3 search parameter inputs.

    1 is a word that's present in the file

    2 or 3 (optional) a word in the filename

    2 or 3 (if starting with a .) (optional) the filetype

     

    so to distinguish between 2 and 3 , the leading . should be used

    all parameters are space separated 

     

    this is what I made so far, but I'm not sure if I'm on the right track

    Screenshot 2023-02-02 at 22.06.57.png

×
×
  • Create New...