Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Running an external GUI program

by chargrill (Parson)
on Feb 01, 2007 at 16:57 UTC ( #597785=note: print w/replies, xml ) Need Help??


in reply to Running an external GUI program

Simplest solution I can think of is to have perl run an applescript. You'll have to dig around in the Script Editor.app to find out how to script your application properly. Once you have a working applescript, you can just plug it into the likes of this:

use Mac::AppleScript qw(RunAppleScript); ... sub run_script { my $script; my $msg = shift; ($script = <<" EOS") =~ s/^\s+//gm; tell application "PDFCompressor" ... # more applescript here end tell EOS RunAppleScript( $script ) or die "couldn't run applescript - $!"; }


--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://597785]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2019-09-23 03:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (276 votes). Check out past polls.

    Notices?