• 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: [Slightly OT] Scripting Bridge in Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Slightly OT] Scripting Bridge in Leopard


  • Subject: Re: [Slightly OT] Scripting Bridge in Leopard
  • From: Philip Aker <email@hidden>
  • Date: Thu, 01 Nov 2007 16:41:52 -0700

On 2007-31-10, at 07:23, Rob Stott wrote:

I guess this is kind of off topic, but as it relates to automating apps in Mac OS X... Has anyone had a play with Scripting Bridge?
I was wondering if it might have any advantages over AppleScript for automation but so far I can't even get the example in the 'Scripting Bridge Programming Guide' to work.
I'm thinking I'm probably missing something obvious (pretty likely!). Anyone got a sample 'Hello World' type thing they'd be prepared to share?

This follows on Chris Nebel's example by eliminating the leaks:

/*
gcc -framework Foundation -framework ScriptingBridge -o sbit sbit.m;./ sbit
*/


#import <Foundation/Foundation.h>
#import "iTunes.h"

int main( int argc, char *argv[] ) {

NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
iTunesApplication *iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"];

if( iTunes != nil ) {
fprintf( stderr, "%s\n", [[iTunes version] UTF8String] );
}
[pool release];

return 0;
}


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@



_______________________________________________
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
  • Follow-Ups:
    • Re: [Slightly OT] Scripting Bridge in Leopard
      • From: Christopher Nebel <email@hidden>
  • Prev by Date: Re: arrow icon
  • Next by Date: Re: [Slightly OT] Scripting Bridge in Leopard
  • Previous by thread: Re: [Slightly OT] Scripting Bridge in Leopard
  • Next by thread: Re: [Slightly OT] Scripting Bridge in Leopard
  • Index(es):
    • Date
    • Thread