I want to send an AppleEvent with custom parameters, not covered in the application's dictionary.

Specifically, I want to implement BBEdit round-trip editing - which perhaps others have already done?

Essentially the missing piece in this is that when you invite BBEdit to open a document, you supply an extra parameter (keyServerID); it then knows to notify your application via an AppleEvent when the document is saved or closed.

However, I cannot figure out how in Transcript to add parameters to a call. So I can do this inside a "tell BBEdit" (all sent via "do ... as applescript):

  open "/test.txt"

or this (equivalent)

  <<event aevtodoc>> "/test.txt"

or this

  open "/test.txt" opening in new_window

or this (equivalent)

  <<event aevtodoc>> "/test.txt" opening in new_window

but I can't figure out a syntax to let me add the optional parameter without using the dictionary, ie something like this should be the equivalent to the last two above:

  <<event aevtodoc>> "/test.txt" <<property OpnI>> new_window

All the variations I've thought of give me a compiler error. So how do I do that, then?

(Of course, if someone has a stack implementing BBEdit round-trip, that would answer this question and several others!)

TIA,

  Ben Rubinstein               |  Email: [EMAIL PROTECTED]
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com        |  Fax  : +44 (0)1273-728866

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to