Jump to content

Snippet with images (need a workflow)


Recommended Posts

@Matty and @egmweb, sorry I wanted to send it to you sooner, but I'm quite busy at the moment, but here is a workflow as example that I have uploaded some of those tips many months ago. The RTF example inside it is not useful anymore with Alfred 4, but you can have a look at the Expand Image example and the RTFD example. In short, you need to create a file with the content that you want for expansion and use it has the file path for the script inside that is connected after the Snippet Trigger. Just copy and paste the one that is useful to you into a new workflow and change the file path + the Snippet expansion keyword and you should be good.

 

Example Workflow: https://d.pr/f/PCcxuP

 

Best

Link to comment

@GuiB,

 

Thank you for the response, although I am still having issues, I can't get it to post 1 image, and ideally I would like it to be able to post text + several images all in different places.

 

EDIT: got it to post 1 picture, how to post text + multiple pictures in different places ?

 

Example:

 

Text

image

 

text

image

image

text 

 

etc..

Edited by Matty
more info
Link to comment

Also, if you need to change field between different outputs, you can add a "Dispatch Key Combo" key object to insert a TAB or ENTER or anything else (like to CMD+V that I use inside the workflow to paste the image) that you would normally do in-between you different expansions

Link to comment
  • 7 months later...
On 6/30/2019 at 9:00 AM, GuiB said:

@Matty and @egmweb, sorry I wanted to send it to you sooner, but I'm quite busy at the moment, but here is a workflow as example that I have uploaded some of those tips many months ago. The RTF example inside it is not useful anymore with Alfred 4, but you can have a look at the Expand Image example and the RTFD example. In short, you need to create a file with the content that you want for expansion and use it has the file path for the script inside that is connected after the Snippet Trigger. Just copy and paste the one that is useful to you into a new workflow and change the file path + the Snippet expansion keyword and you should be good.

 

Example Workflow: https://d.pr/f/PCcxuP

 

Best

how do I find the POSIX file path? As shown in the script description for the workflow! 

I am an amateur!!

Link to comment
On 2/24/2020 at 2:48 PM, Nabil said:

how do I find the POSIX file path? As shown in the script description for the workflow! 

I am an amateur!!

@Nabil, for the script, you need to change the `"/path/to/your/image"`  in the line:

 

set filePath to "/path/to/your/image"

to the path of your file.

 

You can get the file path using the Alfred File Action named "Copy Path to Clipboard" or the 'Copy "fileName" as Pathname' that you can get while doing a secondary click on the file in the Finder and holding the Alt key  (like explained here: https://osxdaily.com/2015/11/05/copy-file-path-name-text-mac-os-x-finder/ )

Link to comment
3 hours ago, GuiB said:

@Nabil, for the script, you need to change the `"/path/to/your/image"`  in the line:

 


set filePath to "/path/to/your/image"

to the path of your file.

 

You can get the file path using the Alfred File Action named "Copy Path to Clipboard" or the 'Copy "fileName" as Pathname' that you can get while doing a secondary click on the file in the Finder and holding the Alt key  (like explained here: https://osxdaily.com/2015/11/05/copy-file-path-name-text-mac-os-x-finder/ )

945716979_ScreenShot2020-02-26at10_22_13AM.thumb.jpg.4d0967b69f06cb7208df596b57b101a0.jpg

 

Im talking about the second line!?

Link to comment
6 hours ago, Nabil said:

Im talking about the second line!?

 

Actually, you don't need to edit that line. The `filePath` string that is mentioned here is simply a variable that refers to the `filePath` string from the first line.

 

I mean, the first line is simply there to set a variable to the file path that you want and then this variable is used later in the script. I put it there at the top so it is easy to see and make it clearer.

 

Hope this helps!

Link to comment
2 hours ago, GuiB said:

 

Actually, you don't need to edit that line. The `filePath` string that is mentioned here is simply a variable that refers to the `filePath` string from the first line.

 

I mean, the first line is simply there to set a variable to the file path that you want and then this variable is used later in the script. I put it there at the top so it is easy to see and make it clearer.

 

Hope this helps!

Yes, finally!

 

it works perfectly for me in Whatsapp desktop, google keep, but image is not being pasted in word and spark mail client!!

Also pdf pasting works in mail client!

Edited by Nabil
Link to comment
  • 3 months later...

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