Jump to content

deanishe

Member
  • Posts

    8,759
  • Joined

  • Last visited

  • Days Won

    522

Everything posted by deanishe

  1. And very non-obvious. As you know yourself, nobody reads the instructions. I'll consider a 3-way toggle (off/top/bottom) for version 2. If you want to change your copy, it's one line.
  2. I've pushed the latest version of awgo. Run go get -u gogs.deanishe.net/deanishe/awgo/... and try building the workflow again.
  3. No on all counts. Alfred only supports plaintext snippets and you need rich text for what you want to do.
  4. http://www.alfredforum.com/topic/8716-searchio-auto-suggestion-from-search-engines-in-different-languages/page-3#entry36928
  5. Well, you still didn't fix the error (change := to =), but it won't work anyway. It looks like I haven't uploaded the latest version of the library you need. I'll upload that in 5 hours when I get back from work. I'll let you know when it's up.
  6. If the build script doesn't work, that's a bug and you should tell me.
  7. Did you seriously upload code I just gave you to a pastebin for me to look at? The error on line 177 is because you're not using the right build command. I have no idea what you're doing. There's a script right there called build-workflow.sh for goodness' sake. As for the other error, Google it. In all honesty, I'm getting pretty tired of answering questions that should be obvious with a bit of thought or a few seconds on Google.
  8. Line 425 in alsf.go. Doesn't filter out invalid bookmarks like bookmarklets, though, does it?
  9. This workflow is still in development, but it can browse Safari bookmarks just fine. Keyword to search bookmarks is bm Keyword to search/browse bookmark folders (what you want) is bmf Use CMD+ENTER to open a whole folder of bookmarks in your browser.
  10. /Documents/app/unclutter/Unclutter\ Files Does that folder really exist? A Documents folder on the root of your disk? Unclutter\ Files with a backslash in the name?
  11. Either open the directory directly from Finder using CMD+ALT+/ (I think that's the default). Or to go directly to a folder, just tell Alfred to search that path via AppleScript, e.g.: tell application "Alfred 3" to search "/Path/To/Your/Folder/Here"
  12. +1 I have a few "helper" workflows for different apps, and I like to use the same Hotkey for each one, cos it'd be daft to have to memorise a different Hotkey for each app. But Alfred won't allow you to use the same Hotkey twice, even though the two Hotkeys are scoped for different applications and thus do not conflict. As a result I have to use Keyboard Maestro, which doesn't have this restriction, to call Alfred.
  13. What's wrong with using Alfred's filesystem browsing mode?
  14. FWIW, I mostly use those Safari scripts (and others) with my AppScripts workflow. If you have a lot of scripts, it's maybe worth a look.
  15. Thanks very much! I'll spend than on some of the lovely IPA the local beer shop has just started selling.
  16. That's an issue with Chrome, not Alfred. Alfred doesn't even know what your browser is. It just asks OS X to open the URL, and it passes it to your default browser. To directly go to a Google search, use the keyword defined in Alfred Preferences > Features > Web Search. The Search Google for 'XXX' you see when there are no local results is one of Alfred's Fallback Searches (Alfred Preferences > Features > Default Results > Setup fallback results).
  17. And here's "Close Tabs to Right": // Close Safari tabs to the right of the active one. ObjC.import('stdlib') function run(argv) { var count = 0, safari = Application('Safari'), win = safari.windows[0], tabs = win.tabs, currentIdx = win.currentTab.index(); // console.log('Tab ' + currentIdx + '/' + tabs.length + ' active.'); if (currentIdx == tabs.length) { console.log('No tabs to close.') return } var first = tabs.length - 1, last = currentIdx; for (i = first; i >= last; i--) { // console.log('Closing tab ' + (i+1) + ' ...'); var tab = tabs[i]; tabs[i].close(); count++; } console.log(count + ' tab(s) closed'); }
  18. Put this in a Run Script Action with Language = /usr/bin/osascript (JS) // Close Safari tabs to the left of the active one. ObjC.import('stdlib') function run(argv) { var count = 0, safari = Application('Safari'), win = safari.windows[0], tabs = win.tabs, currentIdx = win.currentTab.index(); if (currentIdx == 1) { console.log('No tabs to close.') return } // start at currentIdx - 2 due to 0-indexing in JS for (i = currentIdx - 2; i >= 0; i--) { var tab = tabs[i]; tabs[i].close(); count++; } console.log(count + ' tab(s) closed'); }
  19. I think that breaks the workflow. AppleScript chokes if there's a "tell" clause whose target application isn't installed. Unless someone has a better idea, you could try installing Chrome or removing the parts of the workflow that refer to it.
  20. Got you. I'm 99% sure what you want can't be done without any coding. In theory, you'd need to filter on kMDItemPath in the File Filter's Advanced tab, but the Spotlight metadata engine (which Alfred uses) doesn't allow you to use that attribute for searching (or sorting). The only existing workflow I know designed for this kind of thing is Fuzzy Folders, but I'm pretty sure you'd need at least a two word query every time with that. You're probably going to have to write your own Script Filter. The following two commands will both return a list of all directories under ~/Sites that are also children of a "themes" directory. It's up to you to extract the sections of the path you want to filter on. # mdfind is the command-line version of Spotlight mdfind -onlyin ~/Sites 'kMDItemContentType == "public.folder"' | grep '/themes/' # Or using find find ~/Sites -type d -path '*/themes/*'
  21. I've moved the thread to the "Workflow Help & Questions" forum. If that's what your workflow looks like, then it's because you haven't connected the External Script to a trigger. It isn't being run. If that's not the case, please export and upload the complete, non-working workflow somewhere. Can't tell if you're doing something wrong if we can't actually see what you're doing. Regarding your script: The line os.chdir("/Users/Admin/Library/Containers/com.realmacsoftware.clear.mac/Data/Library/Application Support/com.realmacsoftware.clear.mac/") Would be better written as: os.chdir(os.path.expanduser("~/Library/Containers/com.realmacsoftware.clear.mac/Data/Library/Application Support/com.realmacsoftware.clear.mac/")) That will work for any configuration, rather than being tied to user Admin and /Users as the "home" directory. No big deal, but it's a good habit to get into.
  22. If you're having a problem with a workflow, you should ask in that workflow's thread (if there is one). In any case, please post a link to the workflow. Can't tell you what's wrong without it.
×
×
  • Create New...