Jump to content

dfay

Member
  • Posts

    1,054
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by dfay

  1. What's to update? This workflow consists of a 3 line Applescript: tell application "Fantastical" parse sentence q end tell All the real work is done in Fantastical. And the parse command is the only Applescript command for Fantastical, so there's no exposed functionality that isn't being taken advantage of by the workflow as it is.
  2. Somewhat related to this....the alfred:ignore tag on a directory is currently not inherited by its children. This kind of makes sense - tags are obviously specific to individual files / directories. But it also is surprising in the sense that search *is* recursive, but exclusions from search are not. Maybe along with an option to toggle searching of child directories, there could be an option to toggle ignoring of child directories if the parent is tagged alfred:ignore ? Thinking out loud here...
  3. The Kindle for Mac program allows you to copy text from most Kindle books, but it automatically adds the full citation info. to the clipboard. For example, if you copy this sentence: "I was never part of their awareness in the first place." You'll get "I was never part of their awareness in the first place. Nagle, Robin (2013-03-19). Picking Up: On the Streets and Behind the Trucks with the Sanitation Workers of New York City (p. 16). Farrar, Straus and Giroux. Kindle Edition." on your clipboard. This workflow consists of a hotkey trigger and a short Applescript which cleans the clipboard so that it just consists of the copied passage and the page number, in parentheses. So for the example above, the output would be: 'I was never part of their awareness in the first place.' (16) Download it here: https://www.dropbox.com/s/s63yvkzzxw3or5b/Paste%20text%20from%20Kindle%20for%20Mac%20without%20full%20citation.alfredworkflow?dl=0 As always, you'll need to set the hotkey. updated 2019-06-02 to work with Kindle 1.26.1
  4. Wow. Katherine what a great discovery. I can confirm that after pairing as described in that article, Alfred Remote works perfectly over Bluetooth with wifi turned off on both the iPad and Mac. So apparently this feature already exists -- we just didn't know about it! (And -- on an unrelated note -- it also works perfectly for Keynote on iPad's remote functionality for Keynote on the Mac. The need to use shared and/or ad hoc wifi was one of the big problems of the old Keynote Remote -- apparently Apple added Bluetooth connections to the new one without telling us....I never would have bothered to try before I saw this post). Thank you so much for figuring this out!
  5. The problem with this is that app icons would then have three roles: starting an app, switching to an app when it is running but not active, and quitting an app. I'd prefer app icons to have the former two - so that clicking an icon will always activate an app, rather than sometimes activate it and other times quit it. This is consistent with how app icons always work in OS X and iOS. I'd recommend instead that you add commands to close the topmost window and/or app: http://www.alfredforum.com/topic/5410-close-a-windowand-trying-to-figure-out-how-to-quit-an-app/
  6. So...I spoke too soon (and didn't catch every detail of the discussion above - I realize now that hujhax actually made this point...). Alfred apparently uses the clipboard when a hotkey is set up to act on Selection in OS X. In principle one could use a hotkey with no arguments to call a script which 1) caches the clipboard, 2) does something with Applescript UI scripting / System Events like this: http://macscripter.net/viewtopic.php?id=33575 , 3) does the conversion, and 4) restores the clipboard.
  7. Yeah you're probably right. I've subsequently rewritten the whole case converter in Python but never released it. Saving/restoring the clipboard should be easy to add to that version. I'll try to get to it soon. But....I am so used to relying on Alfred's clipboard history that I rarely worry about wiping out the clipboard myself...
  8. I think this does what you're asking for with a regular web query. https://www.dropbox.com/s/nbeb0a5hnkge822/Search%20with%20option%20to%20copy.alfredworkflow?dl=0 The principle would be the same with any existing workflow - you need to duplicate the search action and add the bash script, and link both of them to the keyword with Ctrl modifier active. So it's a bit of work to set up, but I think it can be done with existing tools in Alfred. But I have to say, after using it, I agree that it would be a great built-in feature.
  9. "2°) Interesting workaround but retrieving the copied query from the clipboard is sometimes longer than writing a new keyword + a new query..." - you can type a new keyword and new query faster than you can type command-V?
  10. Is port forwarding necessary? I set up a direct connection on my work machine without changing any router settings, and have been able to control it via Alfred Remote running over cellular data from my iPad, with wifi turned off.
  11. Hmmm....in my experience Alfred Remote is much, much faster at connecting and syncing than everything iCloud.
  12. You might take a look at this workflow for ideas: http://www.alfredforum.com/topic/974-doingtxt-a-time-tracking-workflow/
  13. http://www.alfredforum.com/topic/5462-use-remote-to-send-keyboard-shortcuts/?hl=keystroke#entry33742
  14. So do you want a separate button for each player? Or are you going to enter the query after calling the workflow from alfred remote?
  15. My thinking is, if you're using multiple Macs, then embed the scripts in the workflow so Alfred & Dropbox (I sync my Alfred prefs in Dropbox) will take care of the synchronization for, so there's no need to worry about keeping track of separate copies on each Mac. But if you have another sync solution that's working, this isn't necessarily an advantage. An advantage to options 1 & 2 over 3 is that it's just easier to edit the scripts in your usual coding setup rather than in the Alfred workflow sheets. If you were distributing the workflow publicly, option 3 might be the best choice since you obviously want to include your scripts in the workflow. But...I'd actually use an option 4 here, which would be to call the scripts as in option 1 or 2 (for the reason described in the last paragraph), but to put them in the workflow folder (so that they come with the workflow) rather than keep them in their existing location. I've been using osascript for all my recent workflows rather than run NSAppleScript mostly b/c I am working up stuff from scratch (often with a lot of trial and error) and don't want Alfred to hang if something goes wrong with the script. If you can anticipate a situation where a server might not respond, e.g., and leave your script hanging, I'd go with osascript. With the exception of this possibility, I don't think the performance differences are going to be noticeable in everyday use.
  16. I handled a similar situation with a combination of script filters and reopening Alfred with their results in http://www.alfredforum.com/topic/4384-workflow-picker/ - also built with deanishe's python framework. See also the pinned thread above:
  17. I'd look at https://iworkautomation.com/numbers/index.html - this is definitely doable in Applescript & there is a lot of great instructional material and examples there. Alfred can easily call the Applescript once it's set up but Alfred isn't necessary for this approach - you can run a script from Script Editor or save it to run stand alone.
  18. If you open Script Editor then open the Dictionary for Skype, the only command there is send v : Send command string to Skype API send command text : command string I couldn't find any current info. on the Skype API -- what there was suggests that it's being phased out, see e.g. https://scribie.com/blog/tag/skype-desktop-api/ in favor of Skype URIs which as documented here: https://msdn.microsoft.com/en-us/library/office/dn745878.aspx don't expose volume.
  19. The game is probably blocking system events somehow. Are the other commands making use of AppleScript system events? I can see that the Skype mute one doesn't & I'm pretty sure that the iTunes stuff also can be done in AppleScript without using system events. But Skype doesn't expose volume to AppleScript so you need to use system events there.
  20. HehMan ... it's not entirely clear what you're trying to do. If you're in Alfred and say "Press Return Key", Alfred will behave as if you hit the key, by running the search / query / workflow in the input box. If you're in a text editor and say "Press Return Key", it will also behave as if you hit they key, by advancing the cursor one line. To stop dictation you can 1) use Alfred Remote and the same command above - it will toggle Dictation on or off depending on the state at the time it's run; or, 2) say "Stop Dictation" if you have Advanced Commands turned on as described above 3) press the function key twice Hope this helps.
  21. this works: tell application "System Events" tell process "Skype" set frontmost to true -- raise volume -- change the following to key code 125 to lower volume key code 126 using {command down, option down} end tell end tell
  22. Thanks for this info - I'm in the same situation at work but never knew one could switch the order.
  23. Ok...from what I can tell Hammerspoon only deals with windows, not tabs within tabbed windows (e.g. Safari, Terminal) -- is that right?
  24. I've used macports ... but very rarely....never updated it for Yosemite ... so probably easy enough to switch. I'm getting a bit hung up with lua ... dot notation vs. colon notation...getting contents of tables...I've been spoiled by the python console.... Ok...just found hs.inspect() and things are looking a bit easier....
×
×
  • Create New...