Jump to content

Subject22

Member
  • Content Count

    171
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Subject22

  1. Is there any way to make one of these searches the fallback search option in Alfred? Love the workflow, by the way
  2. The AppleScript included in that workflow is a little unreliable. On my machine it will often execute both try blocks, causing Do Not Disturb to be toggled twice (effectively resetting it to whatever it was before I invoked the workflow). Here's an improved version without that issue. tell application "System Events" set toggled to false option key down delay 0.1 try click menu bar item "Notification Center" of menu bar 2 of application process "SystemUIServer" set toggled to true end try if not toggled then try click menu bar item "NotificationCenter, Do Not Disturb enabled" of menu bar 2 of application process "SystemUIServer" end try end if option key up end tell And here's the workflow.
  3. Would you mind uploading the workflow that's working for you? Cheers
  4. I haven't actually touched the workflow since my last post, I don't think. The version in the first post should be current. Is there something wrong with it? If so, please let me know and I'll do what I can I'm moderately busy and this little project isn't a priority so there may be a delay in fixing any issues, but I will try to sort something out if I can.
  5. This is broken in the Yosemite public beta (probably do to some menu bar reorganisation?) Anyway, I tinkered a bit but couldn't fix it. The best I came up with was this Applescript: tell application "System Events" tell process "SystemUIServer" try key down option click menu bar item 1 of menu bar 2 key up option on error key up option end try end tell end tell Note the use of the try block. In the current version of the workflow the option key gets stuck pressed down, preventing you from typing normal characters until you restart System Events (or reboot your Mac). I can see the script above clicking the Notification Centre icon, because the icon flashes blue when I run it. It doesn't actually toggle Do Not Disturb though.
  6. No worries! I've fixed the link. You can add icons by double clicking on a workflow in Alfred Preferences and dragging an image to the icon slot
  7. A while back I remember locating the app icons Alfred uses for things like system commands (eg: the Alfred-style trash icon). I want to borrow one for a workflow, but I can't seem to find them this time. Anyone know where to look?
  8. Oh right, yes. I was getting a value of zero returned too. Just no error. Thanks again!
  9. Huh. It worked just fine in mine. No errors. Weird.
  10. But why did the same code run fine in AppleScript Editor and not in Alfred? That's interesting. Is that a recent(ish) change? I found numerous bits of code online for getting the number of items in the trash via AppleScript and none of them asked the Finder.
  11. Awesome! Thank you! Any idea what I was doing wrong? Both for the error message and the 0 count for items in the trash.
  12. Using the in keyword doesn't help, unfortunately, as the content of my files isn't relevant to the search - only the titles are. Using a file filter isn't quite what I'm after either. I don't want to do this for just some particular group of folders, but for any folder I choose, in a more ad-hoc manner. The example I gave was just an illustration of a more general problem I'm having. It seems that Spotlight offers more flexibility in this situation, ironically. Thank you for your help, it's greatly appreciated
  13. When running this workflow I see the following error in Alfred's debug pane. No output makes it to the notification action. Hard coding a value for the relevant line causes the workflow to run fine. The script runs fine in AppleScript editor (although bizarrely it gives a value of zero for the number of items in my trash - so if anyone knows why that is I'd be grateful for their input).
  14. I have a lot of files containing the word "outline". Every course I take has a course outline, and most of my assignments have an outline too. Because of this, searching outline in either Spotlight or Alfred is unproductive as the resulting list is very long. In Spotlight however I can simply add an additional search term to narrow my results, e.g.: cosc421 outline yields the course outline and the outline for the course assignment as the top two results. Parfait! But typing this into Alfred gives zero results, because there are no files with names containing all those words. Is it possible to have Alfred apply multiple search terms? Are there any Workflows that offer this functionality? If no to both, has anyone heard of any plans to add such a feature?
  15. I'm not using any sort of auto-cleaner, but I did try repairing my permissions. There wasn't anything there that seemed like it would affect Finder or Alfred, but you never know. The only other odd thing that came out of it was this message: Warning: SUID file “System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAgent” has been modified and will not be repaired. But again, that doesn't seem relevant to me, but it may tell you something for all I know. Thanks for your help, it's very much appreciated :-)
  16. I haven't encountered the issue I originally reported here for a good long while now, but another similar one has occurred a few times over the past few months. Occasionally certain applications do not appear in Alfred's search results. For example, Finder. The problem always goes away again after some time has passed (sometimes a few minutes, sometimes a few hours), though things such as reloading Alfred's cache do not seem to have an effect. Here's the output from the Alfred Metadata tool. /System/Library/CoreServices/Finder.app Internal File Metadata ====================== Display Name: Finder Alt Names: Finder.app File Type: com.apple.application-bundle Comments: Keywords: Last Used: Raw mdls File Metadata ====================== kMDItemAlternateNames = ( "Finder.app" ) kMDItemCFBundleIdentifier = "com.apple.finder" kMDItemContentCreationDate = 2013-09-19 06:03:05 +0000 kMDItemContentModificationDate = 2013-12-18 07:26:38 +0000 kMDItemContentType = "com.apple.application-bundle" kMDItemContentTypeTree = ( "com.apple.application-bundle", "com.apple.application", "public.executable", "com.apple.localizable-name-bundle", "com.apple.bundle", "public.directory", "public.item", "com.apple.package" ) kMDItemDateAdded = 2013-10-25 02:57:26 +0000 kMDItemDisplayName = "Finder" kMDItemExecutableArchitectures = ( "x86_64", i386 ) kMDItemFSContentChangeDate = 2013-12-18 07:26:38 +0000 kMDItemFSCreationDate = 2013-09-19 06:03:05 +0000 kMDItemFSCreatorCode = "" kMDItemFSFinderFlags = 0 kMDItemFSHasCustomIcon = (null) kMDItemFSInvisible = 0 kMDItemFSIsExtensionHidden = 1 kMDItemFSIsStationery = (null) kMDItemFSLabel = 0 kMDItemFSName = "Finder.app" kMDItemFSNodeCount = 1 kMDItemFSOwnerGroupID = 0 kMDItemFSOwnerUserID = 0 kMDItemFSSize = 47203974 kMDItemFSTypeCode = "" kMDItemKind = "Application" kMDItemLogicalSize = 47203974 kMDItemPhysicalSize = 54501376 kMDItemSupportFileType = ( MDSystemFile )
  17. I haven't used Parallels in years, so I'm pretty hazy. What's the file path for Chrome? Is there a different file path for the Parallels version?
  18. Hmm, that is strange. I'm not seeing that at my end. Unfortunately I don't have time to look into this right now so I'll have to ask you to hang tight for a bit. Please post here again every so often to remind me. I might have some time this weekend.
  19. No problem! I'm very glad to have been able to help :-)
×
×
  • Create New...