Sending an apple event with custom parameters (BBEdit roundtrip)

Ken Ray kray at sonsothunder.com
Thu Aug 31 15:11:02 EDT 2006


On 8/31/06 5:39 AM, "Ben Rubinstein" <benr_mc at cogapp.com> wrote:

> Ken Ray <kray at ...> writes:
>> But keep in mind that you cannot do this with Revolution 2.7.3 because of a
>> bug that scrambles the apple events. If you use Revolution 2.7.2, you can
>> use apple events, but they come in backwards on Universal Binary builds
>> (i.e. The class is "csim" and theID is "csod"), although PPC builds are OK.
>> Anything 2.7.1 or earlier should work properly. See Bug #3809 in Bugzilla
>> for more info.
> 
> Thanks Ken - that's a handy reminder for when my Rev app starts *receiving*
> appleEvents from BBEdit.
> 
> However, it's moot until I can figure out how my Rev app can *send* an apple
> event with custom parameters.
> 
> Perhaps I was too optimistic: maybe my question should have been, not how do I
> do this, but *can* Revolution send an apple event with custom parameters?

You should be able to use an AppleScript wrapper, so you can do something
like this example:

tell application "Safari"
    «event GURLGURL» "http://www.apple.com/"
end tell

Note that the characters around "event" are not less-than and greater-than
symbols (i.e. Not << >>) but chevrons (« ») created using Option-\ and
Option-Shift-\.

See:

http://developer.apple.com/documentation/AppleScript/Conceptual/AppleEvents/
debugging_aepg/chapter_9_section_3.html

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list