Jump to content


  • Posts

  • Joined

  • Last visited

sashans13's Achievements

Helping Hand

Helping Hand (3/5)



  1. Yeah, that'll do it Thanks Rodger, appreciate it!
  2. I did, here's the code, you may test it: https://www.dropbox.com/s/xx6jc4r9m3rmj7n/grep%20finder2.alfredworkflow?dl=0
  3. Thanks for the reply! I tried changing it to a "Run Script" action (using /usr/bin/osascript), but when I do, it doesn't run at all (no errors in the console though). Any ideas?
  4. Hi guys, newbie here. I have trouble passing an argument (usually passed with {query}) to NSAppleScript and I have no idea what I'm doing wrong. I'm trying to make a script that'll grep for me with "grep keyword" in the current finder window folder. However, I'm not able to pass the keyword to NSAppleScript, I'll illustrate on an example: What I type in alfred: "grep test" What I get in Terminal: "grep -inr {query} '/Users/[username_stripped]/Downloads/'" I've tried playing around with it but nothing seems to work, {query} doesn't seem to be evaluated at all. Is this normal behaviour? I've tried googling for a couple of minutes, but no luck. .alfredworkflow: https://www.dropbox.com/s/i3v387z01esrqn4/grep%20finder.alfredworkflow?dl=0 on alfred_script(q) tell application "Finder" set pathList to (quoted form of POSIX path of (folder of the front window as alias)) end tell tell application "System Events" if not (exists (processes where name is "Terminal")) then do shell script "open -a Terminal " & pathList else tell application "Terminal" activate tell application "System Events" to tell process "Terminal.app" to keystroke "t" using command down do script ("grep -inr {query} " & pathList) in first window end tell end if end tell end alfred_script
  • Create New...