Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 9, 2011, 05:18 AM   #1
kiantech
macrumors regular
 
Join Date: Jun 2007
Automator works but says fails

Hey guys, I basically have a automator do a bunch of stuff then execute a shell script to run a couple java programs I wrote. When I run the automation everything works, including executing my java files, however I get a run shell script error. Even though everything I wanted to happen...happened.

Here is my shell script...with just a change to the long folder

cd thedirectoryIwant
java NBAFileParser
java NBAWriteUSB

Thats it. Automator runs my java files, but then returns this error.

Run Shell Script failed - 1
(1)

Anyone of a clue, I would greatly appreciate it.
kiantech is offline   0 Reply With Quote
Old May 9, 2011, 06:40 AM   #2
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
Bash returns the exit status of the last command executed, unless a syntax error occurs, in which case it exits with a non-zero value. I can't see a syntax error, assuming thedirectoryIwant is properly encoded if it contains exotic characters.

Is NBAWriteUSB calling System.exit(1) somewhere or raising an uncaught exception?

If you put exit 0 at the last line of your shell script, does it stop the error from appearing?
jiminaus is offline   0 Reply With Quote
Old May 10, 2011, 04:46 AM   #3
kiantech
Thread Starter
macrumors regular
 
Join Date: Jun 2007
Hey thanks for the suggestion, I didn't try that, however I was able to fix it by writing an applescript instead. At first I got a similar error, but after a little googling I was got a suggestion to just do a try statement, and in that statement I run my shell script.

on run
try
do shell script "/dir/ransmit.sh"
end try
end run

that worked, but next time I have a problem I will try your method too.
kiantech is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Using Automator to play audio file from within Automator made application? nobodyhome OS X 10.8 Mountain Lion 0 Jan 14, 2014 04:23 PM
iPhone: iCloud Backup Fails ldstern Jailbreaks and iOS Hacks 15 May 10, 2013 07:00 AM
TimeMachine Fails Mitch1990 Mac Basics and Help 7 Apr 20, 2013 11:38 PM
How do you know if a RAID 1 drive fails? LeandrodaFL OS X 10.8 Mountain Lion 16 Mar 11, 2013 12:12 AM
What if it fails? Epikuros iMac 18 Oct 26, 2012 11:05 AM

Forum Jump

All times are GMT -5. The time now is 02:36 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC