Jump to content

dfay

Member
  • Posts

    1,054
  • Joined

  • Last visited

  • Days Won

    62

Everything posted by dfay

  1. 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.
  2. 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.
  3. 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
  4. 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/
  5. 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.
  6. 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.
  7. 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?
  8. That's kind of really awesome.
  9. Just call the script described here: http://www.macworld.com/article/2033804/control-time-machine-from-the-command-line.html i.e. create a Keyword then connect it to a Run Script /bin/bash object with the script: tmutil startbackup
  10. 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
  11. I think this has come up before but it's a great idea. Alternatively the keystroke for Alfred Preference command-, could just be context-sensitive.
  12. 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
  13. 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
  14. 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.
  15. 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?
  16. 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.
  17. Honestly I've barely used it in months. Sierra broke the serial port driver I was using with my stereo system, which was the main thing I used it with. I built a fair # of workflows but none of them really stuck with me.
  18. 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).
  19. Use Applescript: tell application "System Events" command key down keystroke tab delay 3 command key up end tell I used this technique with Alfred Remote -- see
  20. query="{query}" x = float(query)/60 y = x*25 print "%.2f" % x, "%.2f" % y
  21. 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]
  22. 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
  23. 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
  24. I've had mine in ~/Dropbox/Sync/Alfred/ for years and it works fine.
  25. 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
×
×
  • Create New...