In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Chip Howland) wrote:
> At 1:10 AM +0900 7/11/03, Robin wrote: > >But if I have to have a double clickable perl script I prefer using > >the '.command' technique because I really believe Apple should just > >go ahead and use Perl as the scripting language and put AppleScript > >to bed along with OS9 > > Well, that's flat-out ridiculous. > > Perl is HARD compared to Applescript. That is a matter of opinion. > Here's an Applescript tutorial: > > Open the Script Editor > Type > display dialog "Hello, world." > Run the script > > > and here's a Perl tutorial: [snip way too many lines of tutorial, apparently intended to make perl look a lot harder than it is] Here is what, perhaps, you meant: Open BBEdit Type print "Hello, world." Run the script HAND. HTH. > Now that you've mastered Perl and Applescript, it should be trivial > to use either language to create a script that extracts information > from a FileMaker database and places it into a QuarkXPress template, > then imports images into the document from a remote server, applies > the appropriate style sheets to the text, prints the document on a > color printer, exports the document as a PDF, saves the text as an > HTML file, then opens the HTML file in BBEdit. Yes, quite. A snippet: use Mac::Glue; my $fm = new Mac::Glue 'FileMaker Pro'; $fm->obj(file => $file)->open; # get fields my @fields = $fm->prop(name => fields => database => 1)->get; # get records where second cell isn't empty my @data = $fm->obj(records => whose(NOT => [cell => 2, equals => '']), database => 1 )->get; etc. Or did you intend to mean that manipulating data in AppleScript was hard? > If you find this difficult to accomplish in Perl I don't. :-) -- Chris Nandor [EMAIL PROTECTED] http://pudge.net/ Open Source Development Network [EMAIL PROTECTED] http://osdn.com/