• 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: applescript: recordability
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescript: recordability


  • Subject: Re: applescript: recordability
  • From: Olivier Destrebecq <email@hidden>
  • Date: Wed, 29 May 2002 09:08:03 -0500

everything is working fine, the event that i send to myself are correctly recieved by my app and correctly process, it is just that they are not recorded.

Olivier

On Wednesday, May 29, 2002, at 05:28 AM, Nathan Day wrote:

A problem I found with executing apple scripts in cocoa is that when a script was executed that sent events to the current process ie the app executing the script, the application would ignore all the events until the script editor ran the script and then it would work. AppleEvents sent internally are handled differently from externally received events for performance reasons and it turns out that some initialization that has to occur for a Cocoa app to receive AppleEvents doesn't occur until an event is received externally, internally generated events don't trigger it it. The solution is to post a NSAppleEventManagerWillProcessFirstEventNotification notification before you send the first event. Perhaps try using Script Editor to send some AppleEvents to your App to see if this is your problem.

On Wednesday, May 29, 2002, at 09:05 AM, Olivier Destrebecq wrote:

i've looked in the archived and the documentation and i'm still not able to record event sent by my application.

Here is an example of a function is use to send an event, it get executed, but not recorded.

Is there a key in the plist of the app to set, a special thing to do at application start up

Olivier


//build the event
//
//create the event to insert at the end of the device hubs of the selected item
err = AEBuildAppleEvent('core', 'crel', typeApplSignature,
&myCreatorCode, sizeof(myCreatorCode),
kAutoGenerateReturnID, kAnyTransactionID,
&event, &theError,
"kocl:type('DeHu'), insh:insl{ kobj:obj { form:'indx', want:type('DeHu'), seld:abso($616C6C20$), from:obj { form:'indx', want:type('DeHu'), seld:1, from:'null'() } }, kpos:'end ' }",
theContainer);

if (err == noErr)
err = AESend (&event, &reply, kAEQueueReply, kAENormalPriority, kAEDefaultTimeout, NULL, NULL);

AEDisposeDesc(&event);
AEDisposeDesc(&reply);
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: applescript: recordability (From: Nathan Day <email@hidden>)

  • Prev by Date: Re: NSCell, Matrix, coordinate system
  • Next by Date: Re: NSView -subviews ordering?
  • Previous by thread: Re: applescript: recordability
  • Next by thread: NSView -subviews ordering?
  • Index(es):
    • Date
    • Thread