Works a treat!
On 12 Jan 2004, at 03:47 pm, John Delacour wrote:
At 2:51 pm +1100 12/1/04, Rick Measham wrote:
I used CPAN module Mac::AppleScript and I don't get any reply at all: RunAppleScript
Further to my last posting, I discover that some applications will not behave properly if the tell target is themselves. Eudora and BBEdit 6.5 are two examples of apps that hang, but you can run this from the Terminal or you can run it from the Terminal with Terminal as the target. It will also work fine with tell self in certain other apps.
#!/usr/bin/perl use Mac::AppleScript qw(RunAppleScript); my $asresult = RunAppleScript <<EOS; tell app "Eudora" activate choose file name with prompt "test1" default name "test2" posix path of result end EOS print "\n$asresult\n"
Rick Measham Senior Designer and Developer
Printaform Pty Ltd Tel: (03) 9850 3255 Fax: (03) 9850 3277 http://www.printaform.com.au http://www.printsupply.com.au vcard: http://www.printaform.com.au/staff/rickm.vcf