Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Thanks deanishe Can I please confirm that on your machine you're able to read `list.csv` if called from `script.js` using an absolute path? I've updated `script.js` to use `var file = "~/Documents/list.csv";`. It's still not working for me, which would suggest the problem lies elsewhere rather than with the script. It would be very useful if you're able to confirm this. I note your suggestion to move everything into the workflow. For various reasons, `list.js` needs to be accessible outside the workflow, otherwise I would follow this suggestio
  2. Thanks deanishe I've put everything on GitHub. The repo contains the workflow to be installed into Alfred as usual, plus the files `script.js` and `list.csv` that should be placed in your `~/Documents` directory. Thanks for your help
  3. Thanks deanishe, I appreciate your help with this. The following is a minimal version of the workflow that creates this issue. The workflow is very simple for testing purposes. It consists of only a Script Filter outputting to Large Type. The Script Filer runs my script.js file, which is not located within the workflow package because Alfred is not the only way I access it. The Script Filter script field contains only: ~/Documents/script.js list ~/Documents/script.js looks like this: #!/usr/bin/env osascript -l JavaScript ObjC.import('stdlib'
  4. Thanks deanishe, this has is very useful. I have modified my script to `return JSON.stringify(result)`. When I run the script in terminal, I'm now getting the same JSON that appears to be correctly formatted for Script Filter. $ ~/Documents/myscript.js list {"items":[{"uid":"1","title":"OptA","autocomplete":"OptA","subtitle":"OptA","arg":"1"},{"uid":"2","title":"OptB","autocomplete":"OptB","subtitle":"OptB","arg":"2"}]} However, I'm still getting the same error. I have tracked the source of this to the following line. I'm obtaining the data to po
  5. I have a js file that ends with msg = JSON.stringify(result) $.NSFileHandle.fileHandleWithStandardOutput.writeData( $.NSString.alloc.initWithString(String(msg)) .dataUsingEncoding($.NSUTF8StringEncoding) ) When I run the script from the terminal, it returns JSON that appears to be correctly formatted for Script Filter. $ ~/Documents/myscript.js list {"items":[{"uid":"1","title":"OptA","autocomplete":"OptA","subtitle":"OptA","arg":"1"},{"uid":"2","title":"OptB","autocomplete":"OptB","subtitle":"OptB","arg":"2"}]} In Alfred, I created a workflow t
  6. I'm creating my first Alfred workflow. It takes a keyword, and creates a new outgoing message in Mail.app using AppleScript. Something like this... on alfred_script(q) set theSubject to q tell application "Mail" activate set theMessage to make new outgoing message with properties {visible:true} tell theMessage set subject to theSubject set content to theContent end tell end tell end alfred_script This works fine when I explicitly set theContent to be a text string set theContent to "this is my content" Howev
  • Create New...