Jump to content

Go to Here (updated version)


paulw

Recommended Posts

Go to Here (updated version)

 

Download here

 

Quickly switch the selected path in a MacOS Open/Save dialog based on an Alfred selection.

 

(This is an updated version of the workflow from this topic, based in part on some very helpful suggestions from the community. Starting a new topic so that the link can be updated here in this first post.)

 

For setup, usage, and credits, see the repo link.

Link to comment

If anyone is using MacOS in a non-English language, I'd like to know if the workflow works or fails. There might need to be edits to some properties in the AppleScript.

 

There may also be issues where the workflow doesn't properly detect Open/Save dialogs. If that happens, or if there are any other issues or suggestions, feel free to let me know.

Link to comment

@paulw do you ever imagine your path not being a folder? I ask because you might consider tweaking your file filter with "public.folder" as your file type.

 

image.thumb.png.af58974ce96eb97b2854497441eb109c.png

 

 

I've also remove the need for an argument so it show recents folders without having to search. Also under the limit and sort I've also made some tweaks there as well. Just an FYI.

Link to comment
7 hours ago, sepulchra said:

do you ever imagine your path not being a folder? I ask because you might consider tweaking your file filter with "public.folder" as your file type.

Could you explain this a bit more? As is, the workflow will accept non-folder items and the Open/Save dialog will point to the parent folder of the item, as far as I can tell.

 

7 hours ago, sepulchra said:

I've also remove the need for an argument so it show recents folders without having to search.

I'm a little stumped on this as well. Removing the checkmark for "with space" doesn't permit me to show recent folders without a search. Explain?

 

7 hours ago, sepulchra said:

Also under the limit and sort I've also made some tweaks there as well.

I'd be interested to know if there are any that you feel everyone would want.

 

Thanks for your input!

Link to comment
5 hours ago, paulw said:

Could you explain this a bit more? As is, the workflow will accept non-folder items and the Open/Save dialog will point to the parent folder of the item, as far as I can tell.

 

I understand what you meant now. Yes, sometimes I can think of a file name where I may want to save or open something, but not remember the folder name. Allowing files as a path permits selecting their parent folder.

 

Currently, if a file path is selected in a Save dialog, the file name for the new file is replaced with that of the selected file. I'll update the workflow so that if a file path is selected, the dialog opens the parent folder, and preserves the default new file name.

Link to comment
13 hours ago, paulw said:

Could you explain this a bit more? As is, the workflow will accept non-folder items and the Open/Save dialog will point to the parent folder of the item, as far as I can tell.

 

I didn't realize it functioned that way. In my brain, when I have a save dialog open, I'm always looking for a folder so I just expected that to be the only option.

 

13 hours ago, paulw said:

 

I'm a little stumped on this as well. Removing the checkmark for "with space" doesn't permit me to show recent folders without a search. Explain?

 

If you don't require an argument in a file filter (by unchecking "with space") you don't have to enter a search term. If you hit the space bar it will list items by the parameters setup in limit and sort. This is what mine looks like:

 

image.thumb.png.c0716a737d32fc8578839ad019cd94f2.png

 

If I choose last 3 days -- it shows me recent items. That may be too limiting for some as it does restrict the search. This is definitely something individual users can modify. If you leave it with "Any Date" you can still search the entire search scope. That might be the better way to go.

 

Link to comment
El 6/10/2024 a las 22:23, Paulw dijo:

Si alguien está usando MacOS en un idioma que no sea inglés, me gustaría saber si el flujo de trabajo funciona o falla. Es posible que tenga que haber ediciones en algunas propiedades de AppleScript.

 

También puede haber problemas en los que el flujo de trabajo no detecte correctamente los diálogos de apertura/guardar. Si eso sucede, o si hay algún otro problema o sugerencia, no dude en hacérmelo saber.

I don't know if it's because the system language is Spanish or if I am not using this workflow correctly, but it doesn't work for me. However, I can still use @ahmadt's workflow without any issues. Any suggestions?"

Captura de pantalla 2024-06-14 a las 16.23.44.png

Captura de pantalla 2024-06-14 a las 16.24.00.png

Link to comment
2 hours ago, sepulchra said:

If you don't require an argument in a file filter (by unchecking "with space") you don't have to enter a search term. If you hit the space bar it will list items by the parameters setup in limit and sort. This is what mine looks like:

Oh ok, thank you. I was missing the "hit the space bar" part. When I use that, I see that there are extraneous files that I don't care about, so I see the use of setting input to folders only if you go that route. I think it makes the most sense to do what you suggested—limit File Filter to folders and uncheck "with space". Then if someone wants to select a folder based on a file, they can simply select the file first in Alfred, then use the File Action "Go to Here". 

 

2 hours ago, sepulchra said:

If I choose last 3 days -- it shows me recent items. That may be too limiting for some as it does restrict the search. This is definitely something individual users can modify. If you leave it with "Any Date" you can still search the entire search scope. That might be the better way to go.

I agree. If that only limited the search scope when not entering a specific search term, that might be fine. But limiting the entire search by default I think is to much.

 

Thanks for your feedback!

Link to comment
21 minutes ago, 2pilvic said:

I don't know if it's because the system language is Spanish or if I am not using this workflow correctly, but it doesn't work for me. However, I can still use @ahmadt's workflow without any issues. Any suggestions?"

Hey @2pilvic, in the most recent couple of releases, I added configuration options for other languages. If you haven't already, can you make sure you're using the most recent version and then go to "Configure Workflow..." 

 

image.png.092635712aa2296650e3edfa4ad7c56d.png

 

then edit the fields for "Open" and "Save" button text to match your language: "Abrir" (I think?) and "Guardar"—whatever the button text is in your language, without quotation marks.

 

image.thumb.png.0b65a5f3920fb3edbffe09bc0762c1cb.png

 

Please let me know if that works!

Edited by paulw
clarification
Link to comment

Thank you for the precision. I have already adopted the terms to the system language. In TextEdit or Safari, the workflow works correctly; however, in LibreOffice (which I regularly use for editing documents and spreadsheets), it curiously always repeats the previously used address from the workflow in another application. No matter how many times I select other folders, it always repeats the last one that worked. However, in 'Debugger Running,' I see that it writes the requested address without any error, but it still doesn't change it in the window

Link to comment
4 hours ago, paulw said:

Oh ok, thank you. I was missing the "hit the space bar" part. When I use that, I see that there are extraneous files that I don't care about, so I see the use of setting input to folders only if you go that route. I think it makes the most sense to do what you suggested—limit File Filter to folders and uncheck "with space". Then if someone wants to select a folder based on a file, they can simply select the file first in Alfred, then use the File Action "Go to Here". 

@sepulchra On second thought—I'm getting a lot of not-useful folders when using the space bar. As a default for this workflow, I think it would be better to let users select a file or folder in Alfred or using some other workflow and then to use the "Go to Here" file action from there. That would enable much more nuanced filtering based on whatever the other workflow (such as uses.

Link to comment

@2pilvic It turns out that LibreOffice was blocking cmd-V in the "Go to:" dialog. I've changed the workflow, and it should work now.

 

Go to Here v2.3.2:

 

- at least one app (LibreOffice) blocks cmd-V in the "Go to:", so instead of pasting the path, the workflow simulates the delete key and then simulates typing the path.
- there's a config available for changing the simulated typing speed, if needed for your system
- workflow tidied and refactored
- second delay added to prevent glitches in input
- default delay reduced to 250ms

Link to comment

Go to Here v2.4.1

 

Important: This release removes the List Filter where you may have stored favorite/default paths for use with the workflow. Be sure to make note of the paths you may have stored there before installing. You can replicate that function and more now that this workflow accepts calls for an External Trigger:

  1. In a separate workflow, add a List Filter, File Filter, or Script Filter. The workflow needs to output a file or folder path.
  2. Add a Call External Trigger Output for outputting the path.
  3. In the settings for that output, click “Workflow Triggers…” and choose the trigger for this workflow.
Edited by paulw
changed to v2.4.1 from v2.4.0 because of minor edit
Link to comment
Hace 11 horas, Paulw dijo:

Ir a aquí v2.4.1

 

Importante: Esta versión elimina el filtro de lista donde puede haber almacenado las rutas favoritas/predeterminadas para su uso con el flujo de trabajo. Asegúrese de tomar nota de las rutas que puede haber almacenado allí antes de instalarlas. Puede replicar esa función y más ahora que este flujo de trabajo acepta llamadas para un activador externo:

  1. En un flujo de trabajo separado, agregue un filtro de lista, un filtro de archivo o un filtro de script. El flujo de trabajo necesita mostrar una ruta de archivo o carpeta.
  2. Añade una salida de disparo externo de llamada para generar la ruta.
  3. En la configuración de esa salida, haga clic en "Activadores de flujo de trabajo..." y elija el activador para este flujo de trabajo.

The workflow now works perfectly, also in LibreOffice. Thank you very much.

Link to comment

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