Thanks much for responding! Yay! At 3.25 -0400 1999.05.22, Eric Dobbs wrote: >Lemme see if I get the syntax you're proposing. > >If what I want to do looks like this in AppleScript: > >tell application "Finder" > set the visible of application process "FileMaker Pro" to false >end tell > > >Would it look like this in the glue? >my $b = new Mac::Glue "Finder"; >$b->set($b->p( visible => application_process > => "FileMaker Pro"), 'false'); > >I realize that you're example was "get" and I'm bastardizing >it to assign a new value to a property. Is this what you had >in mind? Just trying to start by understanding the syntax. Close. my $b = new Mac::Glue 'Finder'; $b->set( $b->p( visible => application_process => 'FileMaker Pro' ), { to => 0 }); >I like the prop() and obj() options for legibility. Esp. 'cos >one of the apps I wanna glue is FileMaker Pro. And it has >nasty nested objects that I'm gonna want to take in pieces. I think most people want this. I have to consider whether or not obj and prop might be event names, though, for some app. I don't think they would be. Is this a reasonable assumption? >For example, to get the value from a field in a database, here's >the AppleScript: > >tell application "FileMaker Pro" > cell "LastName" of record 10 of database "Person" >end tell > > >If I'm understanding correctly... > >my $b = new Mac::Glue "FileMaker Pro"; >my $db = $b->o(database => "Person"); >my $rec = $b->get(o(record => 10 => $db))->get; >my $last = $b->get(p(cell => "LastName" => $rec))->get; > ^^^^^^^^^^^^^^^^^^^^^^^^^^ > | > +-------------+ > | >Actually, this part I'm confused about. What's the gluish for >"record 10 of database 1" or "cell 'LastName' of ...". I've >assumed the following: >"(record => 10 => database => 1)" or >"(cell => 'LastName' => $rec)" >But it looks a bit strange to me. This would work, in theory: $last = $b->get( $b->o( cell => 'LastName', record => 10, database => 'Person' ))->get; It produces the exact same Apple event, but I get an error: # Application error -1700: Event not handled. File 'Bird:src:Pudge:pudgeprogs:perl:site_specific:Mac:Glue.pm'; Line 162 Event not handled.-1700 I dunno why, because it works in AppleScript, but not from MacPerl. It doesn't appear to be Mac::Glue-specific, but just sending to my version of FileMaker Pro from MacPerl in general. Even just a '$fm->close($fm->o(window=>1));' event bombs out with the same error. A new Mac::Glue is available now, so you can try it out. >If it'll help, here's what Capture AE offers (I've added the >returns and tabs so I can read it.): > >Process("FileMaker Pro").SendAE "core,getd,'----': >obj { > form:indx, > want:type(crow), > seld:10, > from:obj { > form:indx, > want:type(cDB ), > seld:1, > from:'null'() > } >}" This would be something like: $fm->o( row => 10, database => 1 ); It looks like you are specifying the database by number here, not name. -- 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 macperl-modules-request@macperl.org