You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Automator: Ask for Finder Item if one not used as input

I'd like to send a mail message with an attachment. I've got a script that does what I want if a file is dropped on the Automator Application. But if the Application is launched with a double-click there is no attachment. If I use the Automator action to "Ask for Finder Item" it always asks, even if I drop a file on the Application. Is there a way to check if an file has already been used as an input? And continue if it already has a file dropped on it, but Ask for Finder Item if no item was dropped?

Mac mini, 10.15

Posted on Aug 14, 2020 2:27 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 15, 2020 4:44 PM

It's easy to do with AppleScript, but almost impossible(?) to do with Automator since Automator has very little in the way of logic processing (e.g. if/then, loops, etc.)


When you say you have 'a script' does that mean an AppleScript that you're embedding in your Automator workflow? if so, a few small changes should be all you need.


Otherwise you'll need to pull your workflow out of Automator and into AppleScript proper, which will be a little more work, but not hard.


Let me know what you have right now and I'll walk you through the rest.

Similar questions

2 replies
Question marked as Top-ranking reply

Aug 15, 2020 4:44 PM in response to shepster

It's easy to do with AppleScript, but almost impossible(?) to do with Automator since Automator has very little in the way of logic processing (e.g. if/then, loops, etc.)


When you say you have 'a script' does that mean an AppleScript that you're embedding in your Automator workflow? if so, a few small changes should be all you need.


Otherwise you'll need to pull your workflow out of Automator and into AppleScript proper, which will be a little more work, but not hard.


Let me know what you have right now and I'll walk you through the rest.

Aug 17, 2020 2:43 PM in response to Camelot

Thank you for your response. It is not the answer I wanted, but if Automator doesn't do conditionals then the answer is what I want can't be done.


Thank you for your offer regarding AppleScript. I'm pretty AppleScript savvy, so depending on how important this is to me, I'll have to switch to that route. If I have any questions trying to solve this with AppleScript, I'll just submit another question at that time.


Thanks again!

Automator: Ask for Finder Item if one not used as input

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.