Jump to content

dfay

Member
  • Posts

    1,054
  • Joined

  • Last visited

  • Days Won

    62

Reputation Activity

  1. Like
    dfay reacted to politicus in Let me create a new folder when using the "Move To" action.   
    I just selected 10 files, wanted to move them in a new folder (one that doesn't already exist). 
    It would be awesome if I could move files in a folder that do not really exist. 
     
    After the "Move To" action is selected:
    If the folder already exists, Alfred moves the files in the folder.
    If the folder doesn't exist, let me type the new folder name, press enter and Alfred moves all the selected files in the newly created folder.
     
    What do you think?
     
    Or there is a better solution? @Vero?
     
    Using the buffer feature seems to be slower than the "Move To" action in this case.
     
  2. Like
    dfay reacted to crowsonkb in Feature Request: Bluetooth instead of Wifi Connection   
    Actually, LE isn't even necessary. I found this article on Logic Remote which acts as a sort of companion iPad app for Logic Pro, and was able to use the steps in it to control Alfred on my Mac from my iPad with WiFi off:
     
    http://support.apple.com/en-us/HT202765
     
    This apparently sets up a Bluetooth personal area network where both devices get self-assigned IPs in the same subnet and mDNS works as usual for service discovery. I'm using Yosemite and iOS 8 so I don't know how far back this works but as of the current OS releases it seems to work 'out of the box' already.
  3. Like
    dfay reacted to jarhead in Alfred Remote & Photoshop   
    EDIT: A more thorough write-up can be found here...
     
    While attempting to find ways to implement Alfred Remote into my workflow, I learned that Photoshop supports Applescript (can't believe it took me this long to find out).
     
    Combining Alfred Remote & Photoshop is cool. Among other things, you can launch Photoshop Actions.
     
    As an example, I use Photoshop actions to highlight portions of a document and then create a tear effect that I use in Keynote presentations. Before, I had to remember the keyboard shortcuts I assigned to the various actions and run them at various times. This worked okay.
     
    Now, with Alfred Remote, it is a much easier process.
     
    I can make a selection (or selections) using the marquee tool in Photoshop and with the press of a button in Alfred Remote, the selection is highlighted. I then begin the tear effect action. I can then apply a brush to the top, left, right and bottom each with a separate button. I have buttons for decreasing and increasing brush size (although I still primarily use the bracket keys) and a final action that saves the image to my desktop and closes it in Photoshop.
     

     
    Example Applescript for running an action in Photoshop...
    on alfred_script()   tell application "Adobe Photoshop CC 2014" do action "cool action" from "Main Action"   end tell end alfred_script Example Applescript for pressing a key on the keyboard (left bracket key)...
    on alfred_script()   tell application "Adobe Photoshop CC 2014" tell application "System Events" to key code 30   end tell end alfred_script Now, using my left hand, I run the various actions from Alfred Remote on my iPhone/iPad while applying the brushes with my right hand using my mouse/trackpad. I've used this setup to the point that I can do it all without looking at my iPhone/iPad to press buttons.
     
    Video demonstration (I performed the actions slower in the video so the button presses in Alfred Remote can be seen)...
     

     
  4. Like
    dfay reacted to Andrew in Use remote to send keyboard shortcuts?   
    This is coming in the next release which should make this task much easier...
     

  5. Like
    dfay reacted to deanishe in Q: Choosing between "Run Script" (bash) v. "Run Script" (osascript) v. "Run NSAppleScript"   
    Yeah, I think so. Your workflow's root directory (where info.plist is) is the current working directory when Alfred runs your workflow, so you can run any scripts inside it easily.
     
    You always set the Language to /bin/bash and treat the Script box like a command line.
     
    Using scripts instead of Alfred's Script box makes writing your code a lot easier because you can use a proper code editor and easily track down errors by line number. Also, git etc. don't work so well when everything is embedded in info.plist.
     
    With regard to {query}, what you normally do (when Language = /bin/bash) is use "{query}" (i.e. in double quotes), and select Backquote, Double Quotes, Backslashes and Dollars for the Escaping options to ensure {query} reaches your script untouched by bash.
     
    If {query} is actually a list of command-line options to a script, then yeah, just use {query} without quotes, and turn off all Escaping options, too.
  6. Like
    dfay reacted to stephenmcleod in Flux Remote   
    Flux Remote Control
     
    I've been watching lots of films and making use of the Alfred Remote features lately, and thought it would be handy to be able to control f.lux remotely as well.
     

     
    Github: https://github.com/clickysteve/alfred-remote-workflows/tree/master/Flux%20Control%20(plus%20remote)
    Packal: http://www.packal.org/workflow/flux-control-plus-remote
     
    Features:
    Trigger preferences Quit Flux Trigger Movie Mode Trigger Darkroom Mode Disable Flux for 1 hour Disable Flux till sunrise Disable Flux for current app Works with Flux 34.0
     
    Includes a general workflow to control Flux as well, though I realised after searching Packal afterwards this has already been done - so the remote part will be of most use. 
     
    Screenshot:
     

  7. Like
    dfay reacted to raguay.customct in Hammerspoon Workflow   
    Yes. It is a window manager. To work with tabs of an application, you would have to use AppleScript or JavaScript for automation. You can run AppleScript from Hammerspoon with the hs.applescript module. If you have Dash, the documentation for Hammerspoon is in Dash as well. If not, use the API pages on their website.
     
    Dot are to reference parts of a structure. hs is a global variable that is a structure with an element named applescript. Therefore, to reference it you use hs.applescript. The colons are for class member references. When you get a window, it is a class variable, not a structure. Therefore, it members are referenced with a colon.
     
    It is confusing the difference between different programming languages. I use quite a variety and it does get hard to track them all. But, some are better for some things, while others are better for other things. Lua is super small. That is why they used it in this type of application.
  8. Like
    dfay reacted to vitor in Request - Alfred remote in notification   
    Though a good idea, it would probably be risky at this point, in terms of time wasted. Launch Center Pro did it and had to remove the feature. The approval process on the App Store for innovative features right now is a mess, and until we see some clear sign from Apple that they’re fixing it1, spending resources on it would likely be a bad idea.

    ——————————
    1 And yes, it is broken; just not technically, but in a managerial way instead.
  9. Like
    dfay got a reaction from rice.shawn in PowerPoint Remote   
    I had a similar problem with two versions of Radium in Applescript the other day.  You can get the id as described here: http://www.macosxautomation.com/applescript/features/appobject.html
     
    Just open Script Editor, and run the following one-liner:
     
    get id of application "FakeApp"
     
    Script Editor will ask you "Where is FakeApp?" and open a list of installed apps.  Select the correct version of PowerPoint there and you'll get its id.
     
    You can then address it 
     
    tell application id "com.microsoft.PowerPoint" (or whatever the actual id is)
     
    instead of
     
    tell application "PowerPoint"
     
     
     
     
    Applescript is weird.
  10. Like
    dfay got a reaction from filippocld in Remote Icons   
    See http://www.alfredforum.com/topic/5430-solving-the-icon-bottleneck-ideas/
     
    Setting icons depends on whether you're on the remote config screen or in a workflow.  For the former, just double-click on an existing item and the configuration panel includes the icon image which you can drag-and-drop to replace.
     
    For the latter, when you create a remote trigger, you drop an icon on it.  Then when you add that trigger to the remote config screen or to a workflow remote page, it'll use the trigger's icon.  If you change the icon in the workflow, there's a refresh button on the remote config screen and workflow remote pages that'll pull in the latest icon.
  11. Like
    dfay got a reaction from davidswanson in A little baffled by Alfred Remote   
    Well another scenario I've discovered through some error and trial is to control a computer with an unresponsive keyboard and mouse.  I managed to get everything locked up and beachballing, ready to power down in desperation, but Alfred Remote was able to Quit All Apps.
  12. Like
    dfay got a reaction from gwardlaw334 in Second Monitor   
    Duet Display.  It requires a USB connection but performance is much better than the wifi/bluetooth alternatives.
  13. Like
    dfay got a reaction from chadv in wake from network?   
    Can Alfred Remote send a packet to wake a sleeping Mac at a fixed IP address?  If not, this might be a useful addition.
  14. Like
    dfay got a reaction from gabamnml in Remote Workflows on Packal   
    Actually the URL above leads to workflows with the tag Alfred Remote , not those in the category Alfred Remote .  Correct URL for the category would be http://www.packal.org/categories/alfred-remote .  Just clicking the checkbox without adding the tag won't make a workflow appear at the URL above.
  15. Like
    dfay reacted to rice.shawn in solving the icon bottleneck - ideas?   
    For whenever the new version of the Alfred Bundler gets done, it includes dynamic icon sets (https://shawnrice.github.io/bundler-docs/icons.html).
     
    But... you can actually use these now-ish. You can preview / download the icon sets in any color you need: http://icons.deanishe.net/ or the mirror: http://icons.shawnrice.org/.
     
    Granted, these are only flat icon sets, but they're still something.
     
    (Note: Dean and I got especially excited about the idea because we both suck at icon creation but have a tendency to write a lot of workflows. Dean wrote the entire icon server. He rocks.)
  16. Like
    dfay got a reaction from rice.shawn in Sending Keyboard Modifiers (Ctrl etc.)   
    That's a good point -- I can envision a lot of scenarios where a toggle would make sense if you have a screen in front of you, but where separate buttons are preferable where the state might be unknown.
  17. Like
    dfay reacted to Andrew in Sending Keyboard Modifiers (Ctrl etc.)   
    I'm definitely going to provide a way to more easily dispatch specific key commands and combos to OS X in a future release of Alfred... this seems really popular
  18. Like
    dfay reacted to Andrew in solving the icon bottleneck - ideas?   
    I actually already have a note to consider adding installable "icon sets" into Alfred which would then be selectable in the image pickers, I think this would be a great addition
  19. Like
    dfay reacted to OliverJ in Feature Request: Changeable Button/Icon Size   
    Hi,
     
    it's a great work on Alfred and especially on Remote!
    Thanks!
    I would like to see adjustable buttons / icons.
    For example, one tab where only two big buttons appear, so I could use them blindly...
     
    Best,
    Oliver
  20. Like
    dfay got a reaction from arobel in Using Remote to change Radium stations   
    Clever and much simpler than writing a workflow.
     
    Here is a quick little Radium Now Playing workflow that I made earlier this evening for use with Alfred Remote -- it'll grab the track name and station name and put them up on the screen in large type:
     
    https://www.dropbox.com/s/y4ur0u35ioij6yz/Radium%20Now%20Playing.alfredworkflow?dl=0
  21. Like
    dfay got a reaction from Subject22 in Sending Keyboard Modifiers (Ctrl etc.)   
    A lot of Alfred workflows and commands have options when certain keys are pressed.  These keystrokes can be sent from Alfred Remote with a bit of Applescript.  e.g. to hold and release the Control key, add the following:
     
    Alfred Preferences > Remote > System Commands (or wherever you want on your remote) > + > Run Script > language: /usr/bin/osascript
      then paste in the following short Applescript: tell application "System Events" control key down end tell Name this item "Hold Ctrl" but BEFORE YOU TEST IT add a second command following the same procedure:
    tell application "System Events" control key up end tell Name this 2nd item "Release Ctrl".
     
    Now you can test it and make sure it works.  If you test the first script before adding the second, you will end up with a practically unusable computer b/c the Control key will be down and you will have no way to release it.  I found this out the hard way and had to reboot.
     
    IMPORTANT - this does not work with the Option key for reasons that are unclear.  You can create an Applescript to hold the Option key down, and it will work, but the corresponding script to release does not work, and you'll be forced to reboot to get your keyboard working normally again.
  22. Like
    dfay got a reaction from Subject22 in Sending Keyboard Modifiers (Ctrl etc.)   
    You'll have a much easier time debugging if you write the scripts in Script Editor, verify that they work there, and then move them into Alfred.
  23. Like
    dfay got a reaction from rice.shawn in Sending Keyboard Modifiers (Ctrl etc.)   
    A lot of Alfred workflows and commands have options when certain keys are pressed.  These keystrokes can be sent from Alfred Remote with a bit of Applescript.  e.g. to hold and release the Control key, add the following:
     
    Alfred Preferences > Remote > System Commands (or wherever you want on your remote) > + > Run Script > language: /usr/bin/osascript
      then paste in the following short Applescript: tell application "System Events" control key down end tell Name this item "Hold Ctrl" but BEFORE YOU TEST IT add a second command following the same procedure:
    tell application "System Events" control key up end tell Name this 2nd item "Release Ctrl".
     
    Now you can test it and make sure it works.  If you test the first script before adding the second, you will end up with a practically unusable computer b/c the Control key will be down and you will have no way to release it.  I found this out the hard way and had to reboot.
     
    IMPORTANT - this does not work with the Option key for reasons that are unclear.  You can create an Applescript to hold the Option key down, and it will work, but the corresponding script to release does not work, and you'll be forced to reboot to get your keyboard working normally again.
  24. Like
    dfay reacted to wolph in Advanced calculator with fast off-line unit converter   
    Yeah... it's nice to have accuracy but sometimes it's a bit much
    Right now it rounds to 6 decimal places so things like 4^.5 work without a problem but it doesn't lose precision for calculations like: (25/4)^.5
  25. Like
    dfay reacted to smarg19 in WP CLI Workflow nearly working (WordPress) ;-)   
    @dfay is 100% correct. When you try to run the wp command in line 97 of your script from Alfred, Alfred is running the script in a totally sanitized environment, where installed external command line tools don't exist.
    To make it work, you can try to different typically approaches. First, export $PATH:... before the bash /Applications/MAMP/htdocs/Dropbox/myscript.sh {query} call in Alfred. This will set the PATH variable to whatever you put, and then allow for the relative call to wp that you make in line 97. Second, (my preference), make the call to wp explicit. So it would be something like this in line 97: /usr/bin/local/wp core download --force. This is assuming that the wp executable lives in /usr/bin/local. Wherever it lives, put the full explicit path.
    Either way, you need to avoid any $PATH magic when working with Alfred.
×
×
  • Create New...