-
Posts
1,054 -
Joined
-
Last visited
-
Days Won
62
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by dfay
-
-
Assuming Postbox is handling mailto: links , you could create a workflow that would compose a URL like
mailto:emailname@yourdomain.com?subject=Subject
and then send it to an open URL action.
This means you'd need to pass both the email address and the subject line from Alfred - there are ways to do this, but they all require a bit of work. See http://www.alfredforum.com/topic/3890-help-with-multiple-queries-for-a-gmail-compose-script/?hl=%2Bmultiple+%2Bqueriesfor a discussion.
-
If you're using a hotkey, you can just set its argument to OS X Clipboard Contents and pass it that way.
Otherwise I'd just stick in a bash script with a single line with just one line: pbpaste then connect that to your python script.
I'm assuming you're just going to use an Alfred Copy to Clipboard object at the end -- otherwise there are libraries like pyperclip if you're going to be actively modifying the clipboard midway through the python script.
-
right. set a global hotkey in Alfred that runs an Applescript that tells iTerm to activate, then proceed from there.
-
I still don't get why you wouldn't just activate iTerm right at the start, then write one set of actions based on the knowledge that is active..... Don't you want it active at the end in any case?
-
-
what is your question exactly? How to tell if an app is frontmost in Applescript?
see http://apple.stackexchange.com/questions/171709/applescript-get-active-application
It would probably be more reliable to just tell application "iTerm" to activate , then go from there -- it sounds like you always want iTerm to be activated in the end.
-
See this thread -- on searching Postbox but it highlights PB's limits in terms of playing nicely with macOS.
http://www.alfredforum.com/topic/9233-search-postbox-4-emails-from-alfred/?hl=postbox
-
My latest updates for TaskPaper 3 and OmniFocus:
do shell script "cd '/Users/username/Library/Application Support/TaskPaper/'; cat day.less > theme.less" tell application "OmniFocus" set value of preference id "OFIColorPaletteIdentifier" to "builtin:OmniFocus Light" end tell
Same code but with night.less and OmniFocus Dark for night. You need to create a day.less and night.less TP3 theme.
-
I don't know whether to love this or hate this. It looks so good that everything else on my computer looks old and grungy by comparison
-
well it looks like it's getting an Applescript error but beyond that you should contact the developer of the script
-
See the contextual hotkeys section towards the bottom of this page: https://www.alfredapp.com/help/workflows/triggers/hotkey/
-
Usually I use CodeRunner (for Python & Bash) or Script Editor (for AppleScript) with test queries to get everything working before copying it into Alfred. Makes the debugging process much easier.
-
this is the expected behavior -- as soon as you type a keyword that matches an existing script filter workflow (like the audio output one you mention, which incidentally is working fine for me with Alfred 3), the script executes -- the problem is that the script(s) fail for some reason. Alfred is working as expected, but the workflow is crashing, so Alfred is reverting to default output.
another thing that can happen is that some script filter-based workflows can take a couple of seconds to execute, so you'll get the default search and then the correct results will eventually appear.
If you open the debugger - https://www.alfredapp.com/help/workflows/advanced/debugger/then run one of the workflows that is turning over to google search, you'll probably see some error messages.
-
This generally means there's a bug or some other issue that's stopping the workflow from being able to run, so it falls back on a default search. Which means you should probably search for the workflow pages in the forum or contact the authors.
-
Yes, using a file filter: https://www.alfredapp.com/help/workflows/inputs/file-filter/
-
Hmm....running it on an Apple Mail message .emlx gives fields like this, which allow for a lot more granularity in the search:
kMDItemAuthorEmailAddresses = (
"aperson@ucr.edu"
)
kMDItemAuthors = (
"That Person"
)kMDItemRecipientEmailAddresses = (
"someone@ucr.edu"
)
kMDItemRecipients = (
"Faculty (somepopele@server.ucr.edu)"
)
kMDItemSubject = "pithy but informative subject line"
So the kMDItemTextContent may be the best you can do. If you wanted to push it you could probably find a regex to parse the email out of the text field.
-
If you run mdls on a message, what are the metadata fields displayed? (see https://www.macissues.com/2014/05/12/how-to-look-up-file-metadata-in-os-x/ )
If Postbox is saving the metadata in a form Spotlight (for which mdls is part of the backend) can read, then it should be fairly straightforward to set it up along the lines of Vero's workflow above.
-
-
-
AppleScript with a do shell script command
-
I just had this problem with Spotlight not finding (& Quicklook not displaying) my old WordPerfect files -- when I ran the terminal command to manually import a file
/usr/bin/mdimport -d1 filename
it was showing dyn.ah62d4rv4ge81s6de as the file type
I rebuilt Launch Services (I used MainMenu.app to do this but there's a terminal command to do the same) & after that the type shows as 'com.corel.wordperfect.doc' and Spotlight & Quicklook are back to working.
So maybe rebuilding Launch Services will restore the correct net.daringfireball.markdown file type.
-
you should be able to do this the old way via AppleScript
see http://www.alfredforum.com/topic/5462-use-remote-to-send-keyboard-shortcuts/?fromsearch=1
-
-
this looks like a candidate for a list filter: https://www.alfredapp.com/help/workflows/inputs/list-filter/
Workflow help: Search for clipboard contents in Google?
in Workflow Help & Questions
Posted
You can skip the copying and use a hot key with selected text as the parameter. If that doesn't make sense reply and I'll put up some examples later