Hello,
I have another question on AppleEvent:
I want to send a "do script" command to Nisus Writer. Following the example in
macperlcat.pod, and the examples you gave me another day, I think the
following snippet will work, EXCEPT the AppleEvent parameters
($ae{'params'}) [here, I simply copied the example given in macperlcat.pod].
use Mac::AppleEvents;
my (%ae, $event, $reply);
my $macro;
$macro = 'Find/Replace "a" "b" "-g-SaA"';
%ae = (
target =>'NISI',
class =>'aevt',
id =>'dosc',
params =>["'----':obj {want:type(cobj), " .
"from:null(), form:enum(name), seld:TEXT(\@)}",
$macro]
);
$event = AEBuildAppleEvent(
$ae{'class'}, $ae{'id'}, typeApplSignature,
$ae{'target'},kAutoGenerateReturnID, kAnyTransactionID,
@{$ae{'params'}}) || die($^E);
$reply = AESend($event, kAEWaitReply) || die($^E);
AEDisposeDesc($event);
AEDisposeDesc($reply);
-------
More generally, is there any way to know what we have to put in:
want:type(xxxx)
from:xxxx
form:xxxx
seld:xxxx
?
I have Capture AE, which gives me:
Process("Nisusィ Writer").SendAE "NISI,dosc,'----':メFind/Replace "a" "b"
"-g-SaA"モ, &subj:'null'()"
So I think that "from" must be "null()"...
Thank you in advance for any insight.
Best regards,
Nobumi Iyanaga
Tokyo,
Japan