• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: a.out changed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >a.out changed (From: louie <email@hidden>)

  • Prev by Date: Re: 24U Appearance and Snow Leopard
  • Next by Date: Re: 24U Appearance and Snow Leopard
  • Previous by thread: a.out changed
  • Next by thread: iPhoto trash
  • Index(es):
    • Date
    • Thread