ahmadt Posted July 10, 2015 Share Posted July 10, 2015 Jump to files and folders when opening or saving This is based on http://blog.qsapp.com/post/72195815293/go-to-here-again coming from QuickSilver, I use this script alot, I converted it to work with Alfred 2 You can download it @ http://www.packal.org/workflow/go-here Empyreal, kodiak and Diegobit 2 1 Link to comment
macosxguru Posted July 10, 2015 Share Posted July 10, 2015 Could you explain how this works. Please. Macosxguru Link to comment
spacecadet9 Posted July 10, 2015 Share Posted July 10, 2015 This is really rather awesome... I can see myself using it a lot. Thanks Link to comment
ahmadt Posted July 10, 2015 Author Share Posted July 10, 2015 Very useful workflow! Is it possible to add this feature: If there are no open/save dialogs open, make the directory open in Finder instead. I think one of the scripts here has similar functionality (this, plus the opening in Finder instead if no open/save dialogs are out). The script in question is Carlos-Sz's Recent Items workflow (http://www.alfredforum.com/topic/713-recent-items-40-docs-folders-apps-custom-categories-favorites-interaction-with-opensave-dialogs-and-more/), and the functionality is in "alt" modifier of the "fav" script filter. Hi I'm not expert in AppleScript, but you can go ask Alfred to open any folder if no open/save dialogs is available In Alfred window just type 'Folder_Name then hit enter and it will open the folder in Finder Link to comment
paulw Posted July 13, 2015 Share Posted July 13, 2015 Fantastic! Really the only reason I have Default Folder X installed. Now I can just use this. Link to comment
2pilvic Posted July 13, 2015 Share Posted July 13, 2015 It could include images to explain how it works? Please Link to comment
Empyreal Posted July 2, 2017 Share Posted July 2, 2017 I'm a QS -> Alfred immigrant, too. I love QS, but having to learn ObjC in order to add modules is a show stopper to me. Love this workflow, ahmadt. Thanks for having created it. Quick question, but can you invoke a File Action with a keyboard shortcut? Say I've got a save dialog open in Atom, and I browse for a directory in Alfred, can I configure it so that when the selected directory is show in Alfred, I can just hit something like Shift-Cmd-G to tell Alfred to run that File Action? Link to comment
deanishe Posted July 4, 2017 Share Posted July 4, 2017 @Empyreal: A File Action is just a trigger: it doesn't do anything on its own. You can add a Hotkey trigger and connect it to the same action the File Action is connected to. Set the Hotkey's argument to "Selection in macOS" and it should work. Link to comment
2pilvic Posted July 4, 2017 Share Posted July 4, 2017 (edited) On 13/7/2015 at 7:26 PM, paulw said: Fantastic! Really the only reason I have Default Folder X installed. Now I can just use this. How do you stop using "Default Folder X"?. Could you explain how this works. Please. Thank you Edited July 4, 2017 by 2pilvic Link to comment
2pilvic Posted July 4, 2017 Share Posted July 4, 2017 12 minutes ago, 2pilvic said: How do you stop using "Default Folder X"?. Could you explain how this works. Please. Thank you I got it. No problem. Sorry Link to comment
kodiak Posted April 21, 2018 Share Posted April 21, 2018 This is easily one of the best workflows ever, but it doesn't work in Adobe Photoshop. Any idea why? Link to comment
paulw Posted June 6 Share Posted June 6 (edited) I'd been using Default Folder X for a few years, but decided to minimize my use of apps that need screen recording enabled, so I've updated this workflow to work with Alfred 5. Here's a link to the github repo. Credit given to @ahmadt ! Edited June 6 by paulw sepulchra 1 Link to comment
sepulchra Posted June 7 Share Posted June 7 (edited) just for fun @paulw, I thought I would try and recreate this without the applescript but with alfred's built in objects. And just another thought -- if you wanted to recreate some of the functionality of default folder x, you could also created a list filter with favorite folder paths as well. Edited June 7 by sepulchra additional comment vitor 1 Link to comment
paulw Posted June 8 Share Posted June 8 oh, this is great @sepulchra thanks for teaching me something new! I added steps to restore the original clipboard contents as well. I'll check out trying a file filter too, thanks for the idea sepulchra 1 Link to comment
sepulchra Posted June 8 Share Posted June 8 @paulw out of curiosity, what is the reason for restoring the previous clipboard? wouldn't you be able to access anything previous in your clipboad history? Or are you looking for that path to be transient? Link to comment
paulw Posted June 8 Share Posted June 8 (edited) @sepulchra It's just a matter of minor convenience, to save the extra step of accessing clipboard history, in case the current clipboard was needed for something. For example, opening a file to paste the current clipboard contents into. I had thought that making the path transient would remove it from the current clipboard after pasting and restore the previous clipboard, but it doesn't. Perhaps there a more optimized way of accomplishing what I'm going for, though? Added a file filter as you suggested, that works great. I also added a small applescript based on the original workflow to check whether the frontmost application has a dialog window, and only continue if one exists. I wonder if there's a way to detect specifically if the dialog window is Open/Save? Here's the layout of the new workflow: If you or others don't have further suggestions, I'll update the repo to this one, or incorporate new suggestions. Thanks for your help! Edited June 8 by paulw Link to comment
sepulchra Posted June 8 Share Posted June 8 (edited) very cool. I was asking about the clipboard usage because I think you can accomplish what you are looking to do by just marking the first "copy to clipboard" object that pastes the variable as transient. It is a checkbox at the bottom. this way you don't need to have the additional clipboard variable and copy to clipboard ... i think? if i am understanding your usage.. It does not end up in my clipboard history that way. EDIT: deleted my second question as I answered it. Edited June 8 by sepulchra Link to comment
sepulchra Posted June 8 Share Posted June 8 just adding another note as my coffee is just kicking in..... if you are using a file filter and if I'm understanding your flow, do you need the file action? If you are going to search for a folder at the outset? Or do you find yourself identifying the folder in the finder first? I like the idea of the file filter and setting the date range in limit and sort to "today" or "Last 3 Days" you could also add a List Filter if you had a fixed set of favorites you want to have access to all of the time. Link to comment
vitor Posted June 8 Share Posted June 8 Marking as transient makes the entry not appear in Clipboard History, but it is still in the clipboard at that moment. Meaning that if you ⌘V, that’s still what you’ll get. There may be a simpler way to accomplish this, but I’ll take a look when the next version of the workflow is released. As for File/Universal Action VS File Filter, my recommendation is having both. They don’t really trample on each other and different people have different mental models. I, for example, always use File/Universal Actions because I tend to find the file first (could be in Finder but equally as likely it’s in Alfred via the Thumbnail Navigation’s Fast Entries feature or a simple search). But I often add File Filters if they make sense (and I don’t forget) for other people. 9 hours ago, paulw said: I wonder if there's a way to detect specifically if the dialog window is Open/Save? Unsure. I’ll look at it when the new version is live and report back if I come up with something. sepulchra 1 Link to comment
paulw Posted June 8 Share Posted June 8 @sepulchra, @vitor explained the need for restoring the previous clipboard item well. I figure doing it the way I did, rather than accessing clipboard history with {clipboard:2}, makes the workflow still work even if a user has Alfred's clipboard history turned off. Thanks for the idea about the list filter. Adding it as an option. Is there a way to use the workflow itself to add (or subtract) entries from the List filter? 2 hours ago, vitor said: Unsure. I’ll look at it when the new version is live and report back if I come up with something. Great, thanks! Updated the workflow: https://github.com/paulrudy/alfred-go-to-here/releases/tag/v2.0.1 sepulchra 1 Link to comment
vitor Posted June 8 Share Posted June 8 12 minutes ago, paulw said: Is there a way to use the workflow itself to add (or subtract) entries from the List filter? If the list needs to be updated dynamically, that’s more the job of a Script Filter. Do keep in mind that if you add a Filter (List, Script, or File) in this workflow with your preferred locations, it’s no long generically shareable to other people (which is OK). You could e.g. have another workflow with your specific Filter, and then have it call this workflow via an External Trigger. Best of both worlds: It works for you without extra steps and is shareable to other people. Haven’t inspected the current version yet, will do that later. Have a nice weekend. paulw and sepulchra 2 Link to comment
sepulchra Posted June 8 Share Posted June 8 (edited) All of the additional info makes a ton of sense and I’ve learned a chunk of new things too. Edited June 8 by sepulchra paulw 1 Link to comment
paulw Posted June 9 Share Posted June 9 9 hours ago, vitor said: If the list needs to be updated dynamically, that’s more the job of a Script Filter. I have workflows with script filters, but I haven't actually implemented one before. Would the dynamic updating be done by creating a script for the Script Filter that updates a json file in the workflow folder with new or edited entries? By any chance could you point me to an example workflow where something similar is being done? Link to comment
TomBenz Posted June 9 Share Posted June 9 13 hours ago, paulw said: @sepulchra, @vitor explained the need for restoring the previous clipboard item well. I figure doing it the way I did, rather than accessing clipboard history with {clipboard:2}, makes the workflow still work even if a user has Alfred's clipboard history turned off. Thanks for the idea about the list filter. Adding it as an option. Is there a way to use the workflow itself to add (or subtract) entries from the List filter? Great, thanks! Updated the workflow: https://github.com/paulrudy/alfred-go-to-here/releases/tag/v2.0.1 Go to here shortcut working for MS excel, word etc in open dialog but not in save. Is opt + command + G valid shortcut in save dialog as it does work for me? I checked for conflicting keyboard shortcut shortcut on my machine using Aalpha workflow. Request you to please check this Link to comment
zeitlings Posted June 9 Share Posted June 9 3 hours ago, TomBenz said: Is opt + command + G valid shortcut in save dialog Perhaps just a typo, but it's shift+cmd+G, and yep, that one is a valid shortcut. (Btw. it's the same for Finder windows, i.e. the shortcut is for a generic "Go to Folder" utility.) TomBenz 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now