Hey Shane, It's working with following as suggested by you.
ComponentInstance compInstance = [[OSALanguageInstance languageInstanceWithLanguage:[OSALanguage languageForName:@"AppleScript"]] componentInstance] Thanks alot for helping. On 28 February 2017 at 05:25, Shane Stanley <sstan...@myriad-com.com.au> wrote: > On 28 Feb 2017, at 5:43 am, sumit bansal <sumitonline.ban...@gmail.com> > wrote: > > > > API: OpenDefaultComponent, whenever we call this API, we always get a new > > instance to that component. > > > > *As per definition: *OpenDefaultComponent* Opens a connection to a > > registered component of the component type and subtype specified by your > > application. * > > > > > > But with the following API, we always get the same instance even on > calling > > multiple times. > > ComponentInstance compInstance = [[OSALanguage defaultLanguage] > > componentInstance]; > > > > > > My requirement is to get the different instance on every call. > > > ComponentInstance compInstance = [[OSALanguageInstance > languageInstanceWithLanguage:[OSALanguage languageForName:@"AppleScript"]] > componentInstance] > > > -- > Shane Stanley <sstan...@myriad-com.com.au> > <www.macosxautomation.com/applescript/apps/>, <latenightsw.com> > > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/ > sumitonline.bansal%40gmail.com > > This email sent to sumitonline.ban...@gmail.com > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com