Jump to content

dfay

Member
  • Posts

    1,054
  • Joined

  • Last visited

  • Days Won

    62

Everything posted by dfay

  1. Is something messed up with Packal's rss? I am subscribed to new workflows (via feedly) and find I am seeing the same post over and over, like 3-4 times a day.
  2. I'd look at these two workflows which allow viewing of installed workflows: http://www.alfredforum.com/topic/7271-alfred-keyword-help-find-available-keyword/?hl=dfay#entry39079 http://www.alfredforum.com/topic/4384-workflow-picker/?hl=dfay
  3. Hey....I don't know that smarg19 is around much these days but I don't see anything in the 1.6.5 release notes that should affect this -- unless you have turned on the new Hidden preference to save only the relative path for linked files But...after a bit of testing...the other functions of the workflow work but this one doesn't work for me either. Here's why: The open_attachment function is the only one that calls read_cachedir() which in turn calls ccl_bplist.load, which fails. Here's the full log: 18:06:42 workflow.py:1199 ERROR date value out of range Traceback (most recent call last): File "/Users/username/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.34B64201-8299-4E7C-85A1-F7736E15E97E/workflow/workflow.py", line 1197, in run func(self) File "actions.py", line 168, in main print act(cite_key, action, wf) File "actions.py", line 143, in act open_attachment(cite_key) File "actions.py", line 86, in open_attachment data = read_cachedir() File "actions.py", line 69, in read_cachedir bib_data = ccl_bplist.load(_file) File "/Users/username/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.34B64201-8299-4E7C-85A1-F7736E15E97E/ccl_bplist.py", line 271, in load return __decode_object(f, offset_table[top_level_object_index], collection_offset_size, offset_table) File "/Users/username/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.34B64201-8299-4E7C-85A1-F7736E15E97E/ccl_bplist.py", line 245, in __decode_object val = __decode_object(f, offset_table[value_refs[i]], collection_offset_size, offset_table) File "/Users/username/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.34B64201-8299-4E7C-85A1-F7736E15E97E/ccl_bplist.py", line 126, in __decode_object return datetime.datetime(2001,1,1) + datetime.timedelta(seconds = date_value) OverflowError: date value out of range If you look at my post above, I had a similar error related to bad dates in imported BibTeX -- maybe you imported some problematic BibTeX (of which there is plenty available....) which is causing the crash?
  4. You might look at the hotkey version of the Case Converter workflow: http://www.alfredforum.com/topic/2180-case-converter-including-title-case/?hl=%20case%20%20converter One possible hitch will relate to loss of formatting in the trip from Scrivener -> Word -> clipboard. If all of the modification is done in Applescript in Word you might be ok. But most of the other text conversions out there are based on command line utilities &/or python & other languages that typically don't readily support .rtf or other rich formats to keep the formatting.
  5. Good. All the royalties from my book go to a scholarship fund for disadvantaged South African students -- and not a penny goes to them when someone downloads a pirated copy. Maybe there's a loophole in Russian law that allows this, but this site and workflow basically enable theft, plain and simple.
  6. Not easily. I looked into this a few months ago and it looked like it would be a lot of work to figure out the Amazon Cloud Drive API -- there are no ready made command line tools, Applescript interface, or anything more user-friendly like that. I already have an automated off-site backup solution (Backblaze) so I decided not to pursue it. Having said that, I don't think Alfred is the right tool for the job in any case. Alfred is great for user-initiated actions - searching, launching tasks / apps / opening files etc. - but it's not made for doing stuff in the background based on other kinds of triggers (e.g. run a script when a camera is connected, etc.). For that I'd use Hazel.
  7. My bad....I rebooted and all of these feature are working just fine.
  8. Alfred itself seems to work fine. I'm getting some unexpected Applescript errors in some workflows though, along the lines of [ERROR: alfred.workflow.action.script] 564:573: execution error: System Events got an error: Application isn’t running. (-600) Also....Alfred's Terminal feature is not working for me (quite possibly because it may rely on Applescript under the hood). Nor are Restart or Log Out ... but quitting applications works.
  9. Yeah deanishe I don't get an error, just no response. Here's what the log looks like -- I had just restarted Alfred before running this workflow, then waiting for a bit at the Scanning Alfred keywords... message, and eventually hitting esc. Starting debug for 'Alfred Keywords Help' [STDERR: alfred.workflow.input.scriptfilter] 17:53:45 workflow.py:2140 DEBUG Workflow version : 1.0.2 17:53:45 workflow.py:1543 DEBUG Reading settings from `/Users/username/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ... 17:53:45 workflow.py:2401 DEBUG Update check not due 17:53:45 workflow.py:1778 DEBUG Loading cached data from : /Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle 17:53:45 workflow.py:2349 DEBUG update_data : {u'available': False} 17:53:45 background.py:188 DEBUG Command arguments cached to `/Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/scan.argcache` 17:53:45 background.py:192 DEBUG Calling [u'/usr/bin/python', '/Users/username/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2FA1D3D8-2549-4EA0-AAD5-C717B541BC1C/workflow/background.pyc', u'scan'] ... 17:53:45 workflow.py:2140 DEBUG Workflow version : 1.0.2 17:53:45 workflow.py:2176 DEBUG Workflow finished in 0.044 seconds. 17:53:45 workflow.py:2176 DEBUG Workflow finished in 0.041 seconds. 17:53:45 background.py:197 DEBUG Executing task `scan` in background... 17:53:45 workflow.py:2331 DEBUG Set last run version : 1.0.2 17:53:45 workflow.py:2176 DEBUG Workflow finished in 0.340 seconds. [STDERR: alfred.workflow.input.scriptfilter] 17:53:49 workflow.py:2140 DEBUG Workflow version : 1.0.2 17:53:49 workflow.py:1543 DEBUG Reading settings from `/Users/username/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ... 17:53:49 workflow.py:2401 DEBUG Update check not due 17:53:49 workflow.py:1778 DEBUG Loading cached data from : /Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle 17:53:49 workflow.py:2349 DEBUG update_data : {u'available': False} 17:53:49 background.py:188 DEBUG Command arguments cached to `/Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/scan.argcache` 17:53:49 background.py:192 DEBUG Calling [u'/usr/bin/python', '/Users/username/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2FA1D3D8-2549-4EA0-AAD5-C717B541BC1C/workflow/background.pyc', u'scan'] ... 17:53:50 workflow.py:2140 DEBUG Workflow version : 1.0.2 17:53:50 workflow.py:2176 DEBUG Workflow finished in 0.039 seconds. 17:53:50 workflow.py:2176 DEBUG Workflow finished in 0.037 seconds. 17:53:50 background.py:197 DEBUG Executing task `scan` in background... 17:53:50 workflow.py:2331 DEBUG Set last run version : 1.0.2 17:53:50 workflow.py:2176 DEBUG Workflow finished in 0.270 seconds. [STDERR: alfred.workflow.input.scriptfilter] 17:53:51 workflow.py:2140 DEBUG Workflow version : 1.0.2 17:53:51 workflow.py:1543 DEBUG Reading settings from `/Users/username/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ... 17:53:51 workflow.py:2401 DEBUG Update check not due 17:53:51 workflow.py:1778 DEBUG Loading cached data from : /Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle 17:53:51 workflow.py:2349 DEBUG update_data : {u'available': False} 17:53:51 background.py:188 DEBUG Command arguments cached to `/Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/scan.argcache` 17:53:51 background.py:192 DEBUG Calling [u'/usr/bin/python', '/Users/username/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2FA1D3D8-2549-4EA0-AAD5-C717B541BC1C/workflow/background.pyc', u'scan'] ... 17:53:51 workflow.py:2140 DEBUG Workflow version : 1.0.2 17:53:51 workflow.py:2176 DEBUG Workflow finished in 0.049 seconds. 17:53:51 workflow.py:2176 DEBUG Workflow finished in 0.048 seconds. 17:53:51 background.py:197 DEBUG Executing task `scan` in background... 17:53:51 workflow.py:2331 DEBUG Set last run version : 1.0.2 17:53:51 workflow.py:2176 DEBUG Workflow finished in 0.391 seconds. [STDERR: alfred.workflow.input.scriptfilter] 17:53:52 workflow.py:2140 DEBUG Workflow version : 1.0.2 17:53:52 workflow.py:1543 DEBUG Reading settings from `/Users/username/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ... 17:53:52 workflow.py:2401 DEBUG Update check not due 17:53:52 workflow.py:1778 DEBUG Loading cached data from : /Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle 17:53:52 workflow.py:2349 DEBUG update_data : {u'available': False} 17:53:52 background.py:180 INFO Task `scan` is already running 17:53:52 workflow.py:2331 DEBUG Set last run version : 1.0.2 17:53:52 workflow.py:2176 DEBUG Workflow finished in 0.049 seconds. [STDERR: alfred.workflow.input.scriptfilter] 17:53:52 workflow.py:2140 DEBUG Workflow version : 1.0.2 17:53:52 workflow.py:1543 DEBUG Reading settings from `/Users/username/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ... 17:53:52 workflow.py:2401 DEBUG Update check not due 17:53:52 workflow.py:1778 DEBUG Loading cached data from : /Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle 17:53:52 workflow.py:2349 DEBUG update_data : {u'available': False} 17:53:52 background.py:180 INFO Task `scan` is already running 17:53:52 workflow.py:2331 DEBUG Set last run version : 1.0.2 17:53:52 workflow.py:2176 DEBUG Workflow finished in 0.038 seconds.
  10. I just downloaded 1.0.2 and have the same issue Southgirl described. I checked the source and it contains line 126: log.debug('scanning {0}'.format(workflows_dir)) as deanishe prescribes. I'd post my logs but they are more or less the same as Southgirl's.
  11. See http://www.alfredforum.com/topic/1272-add-to-fantastical/?hl=fantasticalre Fantastical
  12. Have you run it with Alfred's workflow debug mode active? (Click the little bug in the upper right of the workflow editing pane). If the script is producing an error it would jump back to the app that called the script (Alfred).
  13. I'd use bash. The built-in open command has a flag -g which opens an app without bringing it to the foreground. If you want to wrap it in Applescript, it'd look like this: do shell script "open -g /Applications/XXX.app"
  14. Also extensible for Byword by adding tell application process "Byword" to key code 53 using command down to each of the tell application "System Events" blocks
  15. I am thinking of a workflow that would work something like Drafts on iOS. Rather than dismissing after an action is taken, the workflow would remain pinned until explicitly dismissed by the user, allowing the user to take multiple actions on the same argument. Any chance of adding this capability? (By the way, it's quirkily awesome that the first Google hit for "pin alfred window" is the full text of T.S. Eliot's "Love Song of J. Alfred Prufrock".....).
  16. It's not entirely clear to me what you're trying to accomplish but two ideas that may be helpful are 1) use Dean's AppScripts workflow - http://www.packal.org/workflow/appscripts - which can be triggered by a single hotkey (add it and link it to the Script Filter) and opens Alfred with a list of whatever Applescripts are in the Scripts folder for the active app. There's Applescript in the source (on github) which can also detect the active application. 2) call Alfred via applescript: tell application "Alfred 2" to search "whatever "
  17. Just to add to deanishe's point, TE is built to do this stuff & it's much easier to set up there than to try to rig it up in Alfred.
  18. I use a lot of the approaches described in the articles....including using TextExpander instead of Alfred for things like date-stamping. I have a TextExpander snippet for each project I'm working on, which I include in the filename of related files. Then I can search in Alfred by typing find <snippet> and Alfred will return all the files in that project. You can recreate a lot of TE's functionality in Alfred using bash scripts and Alfred's snippets but I'd recommend getting TE as well and using it with Alfred, allowing each tool to do what it does best.
  19. There does seem to be something going on with 10.10.3 that's causing System Events to quit....I am getting the -600 error filling passwords with 1Password (completely outside of Alfred) this morning after it had been working fine....
  20. This is not a bad starting point: http://computers.tutsplus.com/tutorials/the-ultimate-beginners-guide-to-applescript--mac-3436 The key thing to learn from it is how to read an Applescript Dictionary. Once you can do that, you can figure what aspects of an app can be scripted.
  21. This may also fall into the category of obvious things you've already tried....but have you tried a reboot? See http://stackoverflow.com/questions/19957268/applescript-fails-with-error-600-when-launched-over-ssh-on-mavericks I have definitely rebooted at least once since installing those upgrades, so it may have been the case that that's what fixed it (inadvertently) for me.
  22. Also....I forget to write this up in my comment late last night -- there's another section which I believe needs correction. After the first two screenshots under "The Workflow" you instruct the user to "Copy the Alfred library file created earlier to this directory, rename it to tcconverter.swift, and add this code to the bottom of the file:" When I followed these instructions, I got a compiler error on the 1st of the four calls to the compiler (I didn't record the exact details). It looked to me like that command is actually looking for the file Alfred.swift . So rather than renaming that file as the instructions specify, I left it in place and created a new file called tcconverter.swift with just the code for the tcconverter program. After running the compile commands (and making the changes I noted above), my workflow directory ended up with the following files: Alfred.o Alfred.swift Alfred.swiftdoc Alfred.swiftmodule info.plist libAlfred.a tcconverter tcconverter.swift And it worked. Great tutorial overall, by the way, even with these hitches -- thanks again for posting it. If you have a chance, I'd love to see a further explanation of what is going on with the compilation commands and the files that they output.
  23. Finally got around to checking this out. Swift has been updated since this came out. When I ran the 1st of the four compilation commands, I got the following: %xcrun swiftc -emit-library -emit-object Alfred.swift -sdk $(xcrun --show-sdk-path --sdk macosx) -module-name Alfred Alfred.swift:58:105: error: 'countElements' has been renamed to count let matches = self.internalExpression.matchesInString(input, options: nil, range:NSMakeRange(0, countElements(input))) ^~~~~~~~~~~~~ count Swift.countElements:1:36: note: 'countElements' has been explicitly marked unavailable here @availability(*, unavailable) func countElements<T : _CollectionType>(x: T) -> T.Index.Distance ^ Alfred.swift:111:30: error: 'AnyObject?' is not convertible to 'String'; did you mean to use 'as!' to force downcast? home = edict["HOME"] as String ~~~~~~~~~~~~~~^~~~~~~~~ as! Alfred.swift:158:41: error: 'AnyObject?' is not convertible to 'String'; did you mean to use 'as!' to force downcast? bundleId = dict["bundleid"] as String ~~~~~~~~~~~~~~~~~^~~~~~~~~ as! After making the suggested changes, it all worked.
  24. Hmm...I just tried tried four different workflows that rely on System Events and they worked fine (with 10.10.3 and Alfred 2.7)....but I don't use any of these....let me grab one and try it, too. Update: I just tried Audio Switch and it's working fine. Maybe your Accessibility Prefs got reset? (see http://ricardosampayo.com/en/Audio-Switch-Alfred-WorkFlows/ at the bottom).
  25. Yes, I saw it in the release notes - thanks!
×
×
  • Create New...