Re: a.out changed
Re: a.out changed
- Subject: Re: a.out changed
- From: Axel Luttgens <email@hidden>
- Date: Tue, 12 Jul 2011 08:30:45 +0200
Le 12 juil. 2011 à 01:12, louie a écrit :
> Hi all below is the c code and the apple script that I am running the c code from. I get an error when running the scrip from the script editor. What I hear is error then hello.
> Thank you for any help.
> #include <stdio.h>
> int main ()
> {
> printf("hello");
> }
>
>
>
> tell current application
> set pattyPath to (path to home folder as text) & "UnixBins:patty"
>
> do shell script quoted form of POSIX path of pattyPath
>
> end tell
Hello Louie,
The problem is that your executable doesn't exit with a zero return code; by convention, AppleScript's "do shell script" command interprets the fact as an error condition.
Just slightly change your C code:
#include <stdio.h>
int main ()
{
printf("hello");
return(0);
}
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden