[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Help with AppleEvents



First, you may want to consider using Mac::AppleEvents::Simple.  It does
disposing and some of the contructing for you.

At 08.12 -0400 1998.08.13, Ramesh R. wrote:

>Process("Eudora Light 3.1.1").SendAE "core,cnte,'----':obj {form:name,
>want:type(euMF), seld:'TEXT'(), from:'null'()}, kocl:type(euMB)"

>		params => ["'----':obj{want:type(euMF), " .
>			"from:null(), form:enum(name), seld:TEXT(\@)}",
>			"kocl:type(euMB)"
>			]

>Process("Eudora Light 3.1.1").SendAE "core,cnte,'----':obj
>{want:type(euMF), from:'null'(), form:name, seld:"kocl:type(euMB)"}"


>Two questions:
>	1) Why are the AEs reported by AppleScript and MacPerl different
>(see the "seld" part)?

This code:

  seld:TEXT(\@)

is kinda like %s in sprintf().  It says, take the next parameter in the
list and use it as TEXT in seld.  So it takes "kocl:type(euMB)" as text.
Instead, try this:

		params => ["'----':obj{want:type(euMF), " .
			"from:null(), form:enum(name), seld:TEXT(\@)}",
			'', "kocl:type(euMB)"
			]

The added '' parameters should do it.


--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch