Jump to content

Go To Here


Recommended Posts

Posted

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

  • 1 year later...
Posted

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?

Posted

@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.

 

Posted (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 by 2pilvic
Posted
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

  • 9 months later...
  • 6 years later...
Posted (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 by paulw
Posted (edited)

just for fun @paulw, I thought I would try and recreate this without the applescript but with alfred's built in objects.

 

image.thumb.png.cdfb3f5b53469037e1fce7624b53e388.png

 

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 by sepulchra
additional comment
Posted

oh, this is great @sepulchra thanks for teaching me something new!

 

I added steps to restore the original clipboard contents as well. 

image.thumb.png.c4b612e5084c28919b07ef76ab74882c.png

 

I'll check out trying a file filter too, thanks for the idea

Posted

@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? 

Posted (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:

 

image.thumb.png.51836650047267b6025b8250ae21f047.png

 

 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 by paulw
Posted (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 by sepulchra
Posted

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.

Posted

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.

Posted

@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

Posted
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.

Posted
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?

Posted
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 

Posted
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.)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...