Jump to content


  • Content Count

  • Joined

  • Last visited

About jeremycherfas

  • Rank

Recent Profile Visitors

1,505 profile views
  • ayn

  1. Thanks very much for your help. In the end, I went with a simplified script that requires me to save ongoing drafts in the same place with the same name. query=$1 cd '/Applications/MAMP/htdocs/grav-admin/user/pages/03.blog' mkdir ${query} cd ${query} touch item.md mv /Users/jeremycherfas/Desktop/item.md item.md It works fine for now. Obviously I still have a lot to learn about script workflows in Alfred, but this is encouraging.
  2. Apologies for the lack of clarity about my workflow. I was aware that Byword supported Applescript, hence this part of my original question. I am afraid my workflow when writing has to be a bit flexible. Sometimes the file has been saved before, sometimes it has not. Sometimes I think of a good title at the outset, sometimes I do not. The workflow I envisaged would be: Open Byword to start writing If necessary, save temporarily while I continue to work. At some point, think of a title, which becomes part of the YAML front-matter of whatever I am writing.
  3. Ah, I did think of that. But the folder name is a slug based on the title of the piece, which often doesn't become clear to me until after I have written it. However, I could of course open the file as you suggest and then copy over whatever I have written. I'll see whether I can adapt to that. Thanks for the suggestion. I was being a bit blinkered.
  4. I write blog posts in Markdown using Byword. My CMS requires files to be saved as `item.md` in a folder named as a slug of the post title. I have a workflow that uses a very simple bash script to create the folder using the clipboard to pass the post title to the workflow and doing a few text transformations along the way. I would now like to extend that by getting Byword to save the contents of the document to `item.md` inside the new folder. I can create the file by extending the bash script, but is there a way I can directly tell Byword to save the docume
  5. My "problem" is that I started using Applescript long before I had even heard of Alfred, and so for some of those simple in and out automations it is just the easiest thing for me. I'm not looking for help with Applescript (well, I am ...) but for help in using it with Alfred, mostly using Alfred as a trigger. From what I hear (e.g. On Automators FM) JXA is even stranger.
  6. Would you be willing to name names? Then I could study their workflows and learn.
  7. I'm sorry. My tone came over wrong. I sincerely meant thank you. I tried it as a Run Script action instead and all is well. My comment reflected the fact that whatever I searched for in Applescript seemed to focus more on why Applescript was a bad language rather than how to use it with Alfred. Your tip about not using NSAppleScript action, for example, cropped up occasionally without context.
  8. OK, thanks. I guess I don't know enough about Applescript to dislike it as much as many people here. Got it working a different way.
  9. I know this is a total noob question, but how do I pass the contents of the clipboard to an Applescript that I want to trigger in Alfred? I have a script that works fine if I copy some text to the clipboard and then run the script. Now that it works, I would like to be able to trigger the script from Alfred. I just cannot work out how to pass the contents of the clipboard to the script, the first line of which is `set theText to the clipboard`. Is there a way to select the text in the document and then trigger the script? I suppose that would mean changing the first line, but that's no pro
  10. Thanks for this workflow. I have looked at `settings.json` but I do not understand what to change in order to get a file to open in BBEdit. Can you please explain? Thanks. Jeremy
  11. If you say so. Wanders off to make tea while the update happens ...
  12. Since installing 3.6, Alfred crashes repeatedly. I have not been able to isolate the specific behaviour that causes it to crash. Most recent system.log: Feb 27 08:48:38 Jeremys-iMac Alfred 3[24089]: AppleEvents: received mach msg which wasn't complex type as expected in getMemoryReference. Feb 27 08:48:39 Jeremys-iMac Alfred 3[24089]: AppleEvents: received mach msg which wasn't complex type as expected in getMemoryReference. Feb 27 08:48:39 Jeremys-iMac com.apple.xpc.launchd[1] (com.runningwithcrayons.Alfred-3.154912[24089]): Service exited due to signal: Segmentation fa
  13. At last, after lots of hunting, I have a script that does what I need. Not to see whether I can modify it do add a timestamp and a newline. Thanks.
  14. I recently discovered Matthew Healy's Text Tools for Alfred. They really help me, with the exception of the Create script. This fails for reasons I do not understand. Debug has this error: [2018-01-29 14:53:32][ERROR: input.scriptfilter] Code 1: Traceback (most recent call last): File "pygrep.py", line 25, in <module> fb.add_item(repr(tokens[1])[1:-1], tokens[0], tokens[0]) IndexError: list index out of range I guess there must be something I need to update. I am on High Sierra with late
  • Create New...