Jump to content

raguay.customct

Member
  • Posts

    756
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by raguay.customct

  1. If you use JavaScript for Automation (JXA), you can use this to get environment variables:

     

    ObjC.import('stdlib');
    var alfver = $.getenv('alfred_version').split(".")[0];

    var alfapp = "Alfred " + alfver;
    var appAlfred = Application(alfapp);
    appAlfred.includeStandardAdditions = true;
    appAlfred.runTrigger("OpenDir", {
       inWorkflow: "com.customct.AlfredBrowser",
       withArgument: "{query}"
    });

     

    It is run by oscascript with the "-l JavaScript" flag. This example get the Alfred version for knowing which Alfred to call and external trigger.

  2. Can you open the workflow in Alfred, click on the t:addtask box, click the debug button (looks like a bug in the upper right corner), and post the messages that show up. You can read my tutorials on Alfred workflows to understand how they work:

     

    https://computers.tutsplus.com/tutorials/alfred-workflows-for-beginners--mac-55446

    http://computers.tutsplus.com/tutorials/alfred-workflows-for-intermediates--mac-60557

    http://computers.tutsplus.com/tutorials/alfred-workflows-for-advanced--mac-60963

    http://computers.tutsplus.com/tutorials/alfred-debugging--cms-20439?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+mactuts+%28Tuts%2B+Mac+Computer+Skills%29

     

    The last one explains the debugger and how to use it. So, if you do not understand what I mean, definitely read the last tutorial to know how to use the debugger.

     

    Here is a picture of what it should look like:

     

    https://www.dropbox.com/s/2sdgc4wf2y540b1/Screen.png?dl=0

  3. I just did a major update to this action. The new features are:

     

    1) Paste through Keyboard Maestro (expanding the %| cursor placement macro).

    2) Added the next Handlebar helper for doing relative dates (see the new help file).

    3) Added the ability to hook into the Handlebar template engine by adding a JavaScript cell in the Defaults notebook. Now you can add your own helper functions. (see the new help file and new defaults file for examples).

     

    You will need to redownload from Packal and reinstall the help files to get the new documentation. I'm having a lot of fun with this one and making many templates (over 100 now).

  4. It would not be a url, but a unix path to the file. Since you saw the name of your project "todo", it was working. Type your message and select the project you want it added to. It will then save the file location for next time and add the task. It doesn't save the file location until you have successfully added a new task.

  5. Hello ! Thx for your work but it's doesn't work for me. When I want to add a new task, nothing happened. :(

     

    Is TaskPaper open to your project TP file? If not, that is why. The first time you use the "t:addtask", you have to have TP3 open to the project file. It then saves this files location for adding to without TP3 open. It stores the project file name in "~/.tpProjectFile". If this file is blank or points to a non-existing file, the "t:addtask" command does nothing. I should probably add a note for the user. Working on it...just added it to my project list

  6. Can you please select the debug option on the script filter and post the output. That output will tell me whether or not this is a problem that I was somewhat wondering if it would happen.

     

    I think I know what the issue might be. I am compiling a Haskell program to get the different snippet names from the library. I have a large number of snippets and the interpreted version was too slow. I believe it isn't able to find the dynamic loading library files on a system without Haskell. I developed the program with the Haskell for Mac IDE, but I can't get it to produce a static link image. Working on it.

     

    Also, you might check to see if Alfred can see your node.js install. The ~/Library/Application Support/Alfred 2/workflows/com.customct.QuiverWF/node.txt should point to the program. Check to make sure it is.

     

    It good to know that someone else is trying the workflow! Thanks for the feedback.

  7. Hi,

     

    I actually have a workflow that does just what you are asking. I haven't released it because it is a complicated workflow that needs a tutorial and I haven't had time to write it yet. The workflow uses Alfred, Dropbox, and Hazel. You set up a location in Dropbox for scripts that Hazel sees updated on the other computer and send it to the workflow for running the script. It isn't instant since it depends on the sync time of Dropbox and when Hazel notices the new file (Hazel uses a polling system). I use it to perform tasks on my Mac mini while I am traveling and using my Mac Air. If you are interested, maybe it can whip up a brief description on how to use it this week and sent it out.

  8. It just affects the location of the Alfred.preferences file (which is actually a directory that contains all the preferences and workflows). The cache and data directories are always in the normal locations. Those directories are not shared.

     

    Also, I tried to update the script to take that into effect, but somewhere else in the script it had problems with spaces and parenthesis in the path (My path has both). You might want to thoroughly check the script for that condition.

  9. Just create a directory with just the info.plist file that you found in it. then add the ".alfredworkflow" to the directory name. When you double click on it, it will automatically be loaded into Alfred. In OS X, a directory with a specialize extension is not treated like a directory, but like a data file for a particular program to load. Alfred registers any directory with the extension ".alfredworkflow" as a data file that Alfred can load. Alfred then copies the directory to a directory of all workflows. You can then use it freely.

  10. Just you system. I give me this:

     

    Starting debug for 'Unicode Characters'

    [ERROR: alfred.workflow.input.scriptfilter] Code 1: 09:27:57 workflow.py:1972 DEBUG    Workflow version : 0.1.0
    09:27:57 workflow.py:1646 DEBUG    Cached data saved at : /Users/raguay/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/net.deanishe.alfred-unicode/last-query.cpickle
    09:27:57 characters.py:117 DEBUG    50 results for `s`
    09:27:57 characters.py:231 INFO     50 results for `s` in 0.072 seconds
    09:27:57 workflow.py:1387 DEBUG    Reading settings from `/Users/raguay/Library/Application Support/Alfred 2/Workflow Data/net.deanishe.alfred-unicode/settings.json` ...
    09:27:57 icons.py:37 DEBUG    Generating 50 icons...
    09:27:57 icons.py:51 DEBUG    cmd : ['/Volumes/Users/daj/Library/Developer/Xcode/DerivedData/IconGenerationHelper-bbowvswngqbbjugdvgdqtwpjvgdp/Build/Products/Debug/IconGen', '--outputdir', '/Users/raguay/Library/Application Support/Alfred 2/Workflow Data/net.deanishe.alfred-unicode/icons', '--font', 'ArialUnicodeMS', '--size', '256', '--logfile', '/Users/raguay/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/net.deanishe.alfred-unicode/net.deanishe.alfred-unicode.log']
    09:27:57 workflow.py:1990 ERROR    [Errno 2] No such file or directory
    Traceback (most recent call last):
      File "/Users/raguay/Dropbox (Personal)/Richard/rag/Alfred/Sync/Alfred.alfredpreferences/workflows/user.workflow.163952ED-A8FB-4341-B0E6-6FD9CA0F65AC/workflow/workflow.py", line 1983, in run
        func(self)
      File "characters.py", line 252, in main
        size=wf.settings.get('size'))
      File "/Users/raguay/Dropbox (Personal)/Richard/rag/Alfred/Sync/Alfred.alfredpreferences/workflows/user.workflow.163952ED-A8FB-4341-B0E6-6FD9CA0F65AC/icons.py", line 55, in generate_icons
        stdout=subprocess.PIPE,
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
        errread, errwrite)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
        raise child_exception
    OSError: [Errno 2] No such file or directory
    09:27:57 workflow.py:2008 DEBUG    Workflow finished in 0.123 seconds.
    [iNFO: alfred.workflow.input.scriptfilter] <?xml version="1.0" encoding="utf-8"?>
    <items><item valid="no"><title>Error in workflow 'net.deanishe.alfred-unicode'</title><subtitle>[Errno 2] No such file or directory</subtitle><icon>/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns</icon></item></items>

×
×
  • Create New...