|
I can't figure out how to pass an array or list to an AE method. Below please find perl code example that, I think, is inserting the text into the image, but out of frame. Also, commented out, the working AppleScript.
Any help would be appreciated,
Fred
--snip--
#!/usr/bin/perl
use Mac::Glue;
my $GC = Mac::Glue->new("GraphicConverter");
my $name = "Macintosh HD:imgtmp:2005:05:11:Thumbs:22.jpg"; # needs to be old style, grrr
$GC->silentopen($name);
$GCWin = $GC->obj(window => 1);
my @color = (0,0,0);
my @box = (10, 10, 195, 195);
$GCWin->draw_text_into(text => "test test test", color => \@color, box => \@box, font =
+> "Gill Sans", size => 24, textface => 1, justification => "1", antialias => "true"
+);
# tried array refs (above) as well as strings, "(10, 10, 195, 195)", and anon. lists to no avail
# --working AppleScript example:
# tell application "GraphicConverter"
# set imgpath to ("/imgtmp//2005/05/11/Thumbs/22.jpg") as POSIX file as string as alias
# silentopen imgpath
# tell window 1
# draw text into text "billy" color {0, 0, 0} box {10, 10, 195, 195} font "Gill Sans" size 24 tex
+tface 1 justification 1 with antialias
# end tell
# end tell
|