Stopping Automator "Run Applescript" if file not found.

Hi all,

I'm creating a folder action that, when a file is added to the folder, will search the folder to see if the file is of a certain type (by the extension) and then run an Applescript that will open the file in the appropriate program. The problem is that not all files that go into the folder are of the correct type. Is there any way to tell Automator or Applescript to stop if no file is found (essentially "input" should be empty)?

Thanks,
Stuart

Mac OS X (10.4.6)

Posted on Jun 4, 2006 9:43 PM

Reply
3 replies

Jul 12, 2006 7:45 PM in response to Michael Henley

Thank you for a helpful answer. I recently wrote an Automator application that opens several web pages in tabs and checks my email. It is set to run at login. Using a modification of your code and a line I pick up elsewhere I was able to make the Automator application end when I press command+. keys.

Perhaps you can answer a different question for me. I am new to Automator but catching on quickly. I am not very good at AppleScript however. I have three automator-based workflows saved as applications. One needs to run every day and then trigger one of the other two depending upon the day or date.

The branching seems to work OK but once the appropriate workflow starts to run I get an error. I think it is -1708. Any help you can provide would be appreciated.

2 Gig G5 Mac OS X (10.4.7)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Stopping Automator "Run Applescript" if file not found.

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