-
Posts
1,054 -
Joined
-
Last visited
-
Days Won
62
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Everything posted by dfay
-
Email Forward to specific address + No Signature
dfay replied to ixium's topic in Workflow Help & Questions
Mail Act-On (a mail plug-in) rules can strip a signature. I believe they use AppleScript (sorry on my phone right now...) so it should be possible. -
That makes sense. I thought about trying to cook a solution with AppleScript as well but realized the app-specific issue would make it nigh impossible.
-
Allow a keyword to have the argument pre-populated with selected text (or maybe add a modifier key that does so), just as hotkeys have the option to act on selected text already. For use scenario see
-
Adding Content to Front and Back of Selection
dfay replied to ixium's topic in Workflow Help & Questions
Good Q. As far as I can tell there's no way to have a keyword act on selected text. You'd need to copy to the clipboard first and paste in the text. I'll add it as a feature suggestion b/c it would be useful. BTW I semi-resolved the hotkey issue by writing this workflow which will list all hotkeys: https://www.alfredforum.com/topic/4384-workflow-picker/ -
Just got this same error message (and applied the same fix, using a Run Script action) working on an AppleScript for Microsoft Word. Chances are its an artifact of the MS code base being 15+ years old at this point -- supposedly Office 2016 was a complete rewrite in Cocoa but it looks like there's still some Carbon deep down in there.
-
Re #1 & 2 -- I've written a URL handler to allow creating a new Ulysses sheet that will subsequently be linked to a record in BibDesk -- the URL handler responds to ulbd:// and adds the newly created sheet to BibDesk -- but I've never changed it since (got it right the first time ) so I'm not sure whether updating would break anything. But...registering the URL handler is entirely done within the app bundle ( see http://www.macosautomation.com/applescript/linktrigger/index.html ) so I think if that app bundle was contained within the workflow directory and updated / replaced along with new versions of the workflow, the updating shouldn't be an issue. re: 3-5 -- moving groups and sheets around doesn't seem to change the IDs in Ulysses as far as I've observed, so I think one would just need to capture the group ID once. Or are you saying you want to have an inbox sheet (with its own ID) for a group (with its own ID)? In that case the inbox sheet could be separated from the group if the user rearranged stuff.... My use pattern is to just use the one Inbox and file stuff from there, so separate inboxes per group are outside my normal usage. There's also the possibility of using paths instead of IDs with groups but that seems rather error-prone.
-
Rob if you're adding to this actively I put up a draft for creating / appending from Alfred here: haven't had time to fully troubleshoot but maybe you want to run with it?
-
That's kind of really awesome.
-
Placing Files in InDesign using Alfred Commands
dfay replied to timogeib's topic in Workflow Help & Questions
I don't have InDesign to test but if you're passing from a File Action to AppleScript you need to begin the script like this: set myNameFile to POSIX file "{query}" See https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/ReferenceFilesandFolders.html -
Please allow to retrieve user's query from a File Filter
dfay replied to nikivi's topic in Alfred Feature Suggestions
OK I see what you're saying. You want to act on the selected text but perhaps change the query later and have save the changed query. You're going to have to write a custom script filter that saves the query in a file every time and then runs the search. Running the search is pretty easy -- you can do it in bash using mdfind (the command-line interface for Spotlight) and it should be blazing fast since Spotlight does the heavy lifting. mdfind 'kMDItemTextContent == "*{query}*" && kMDItemContentType = "com.mindnode.mindnode.mindmap"' -onlyin ~/Library/Mobile\ Documents/W6L39UYL6Z~com~mindnode~MindNode/Documents That will return a list of results. You just need to hook it together with the programming language and Alfred workflow library of your choice -
Please allow to retrieve user's query from a File Filter
dfay replied to nikivi's topic in Alfred Feature Suggestions
what are you trying to accomplish? The answer is right there in the other thread, pipe it to the clipboard. Or just hit command-A command-C and copy it. Or if you really don't want it on the clipboard, you can write it to a file. But I'd recommend just using the clipboard and your clipboard history (in Alfred or elsewhere -- I prefer Copied). If you're looking for an example of a script filter that produces an actionable list of files, see -
I think you'd need to use Karabiner or the like to remap the ctrl key to some other combination and then set Alfred to use that combination to launch.
-
Clicking action in Alfred menu is sometimes ignored
dfay replied to Joe7's topic in Discussion & Help
Hmmm....I haven't seen this at all with a new MPB 13" which I've been using since late November (both with and without Better Touch Tool which is monitoring clicks etc....). Do you have anything else running that is intercepting or monitoring mouse clicks? -
See also https://github.com/qlassiqa/qworkflow You may need to change some references from Alfred 2 to Alfred 3 but otherwise all the workflows I built with this are still working fine.
-
Would like to automate multi-step process with Alfred
dfay replied to RLMason's topic in Workflow Help & Questions
This is crying out for Hazel. It might be possible in Alfred but it's going to be convoluted whereas Hazel lets you automatically run scripts on files in a given directory (thereby avoiding the human intervention necessary in step 2). -
query="{query}" x = float(query)/60 y = x*25 print "%.2f" % x, "%.2f" % y
-
Also if you want to go further here is a whole command-line time calculator library I wrote in python some years ago. The code above does the conversion to minutes rather than seconds but it's basically the same as the input_time, to_seconds and base_time functionality below. def to_seconds(i): seconds=int(i[2])+(int(i[1])*60)+(int(i[0]) * 60 * 60) return seconds def from_seconds(raw_seconds): seconds=abs(int(raw_seconds)) minutes=0 hours=0 while seconds > 59: seconds=seconds-60 minutes=minutes+1 while minutes > 59: minutes=minutes-60 hours=hours+1 if raw_seconds<0: hours=hours*-1 return [str(hours), str(minutes), str(seconds)] def input_time(): time = raw_input('enter time in h:m:s format: ') time_list=time.split(":") return time_list def add(base_time): increase=input_time() return(from_seconds(to_seconds(base_time)+to_seconds(increase))) def subtract(base_time): decrease=input_time() return(from_seconds(to_seconds(base_time)-to_seconds(decrease))) def multiply(base_time, multiplier): return(from_seconds(to_seconds(base_time)*multiplier)) def divide(base_time, divisor): return(from_seconds(to_seconds(base_time)/divisor)) def milePaceToKMPace(mile_pace): return(multiply(mile_pace,0.621371)) def kmPacetoMilePace(km_pace): return(multiply(km_pace,1.609343994)) def decimal_equivalent(base_time): return(to_seconds(base_time)/3600.0) def negative(base_time): return(multiply(base_time,-1)) def display_time(i): if len (i[1])==1: i[1]="0"+i[1] if len (i[2])==1: i[2]="0"+i[2] print i[0]+":"+i[1]+":"+i[2]
- 9 replies
-
- workflows
- time tracking
-
(and 2 more)
Tagged with:
-
Try this in a Run Script box with language as python and input as {query}. You can pipe it out to a Copy to Clipboard action. i = "{query}".split(":") m=int(i[1])+(int(i[0])*60) print float(m)/60
- 9 replies
-
- workflows
- time tracking
-
(and 2 more)
Tagged with:
-
Try this in a Run Script box with language as python and input as {query}. You can pipe it out to a Copy to Clipboard action. query="{query}" x = float(query)/60 y = x*25 print x,y
-
I've had mine in ~/Dropbox/Sync/Alfred/ for years and it works fine.
-
well the easiest way to do this is just to use the built in calculator feature or if RPN is your thing there's this which I made but never use - or you can use bash and bc: http://unix.stackexchange.com/questions/30478/doing-simple-math-on-the-command-line-using-bash-functions-1-divided-by-2-us