[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

re: [MacPerl] Getting started with Applescript & Perl



charles@jolt.mpx.com.au (Charles Cave) writes:
} I now have MacPerl 5.0.7 installed and Applescript. What I 
} would like to do from MacPerl is to tell GraphicsConverter
} to open a specific file, or Netscape to open a file or
} URL. Is this hard to do in Applescript?

GraphicsConverter isn't scriptable.  You'll still be able to "tell
application "GraphicsConverter" to open alias "path:to:file"", but you
won't be able to do much else.  Netscape (at least the copy of Atlas I
have lying around is) is scriptable, so you can "tell application
"Netscape" GetURL "url"".  Fire up the ScriptEditor and choose "Open
Dictionary", then choose Netscape to read its "aete resource", which
tells you how to script Netscape from Applescript.

} 
} Is there an archive of sample MacPerl/Applescript programs?

Start with Matthias's MacPerl page (look in the ? menu when MacPerl is
running) for Perl.  <http://www.scriptweb.com/scriptweb/> is the place to go for Applescript.

} 
} Maybe I should buy a book on Applescript. What books do you
} recommend? I've seen a book titled "The Tao of Applescript"?

Your best bet, IMHO, is the "AppleScript Language Guide English
Dialect", ISBN 0-201-40735-3, published by Addison-Wesley, which is the
authoritative book.  Tao is fine, but you'll want something more
comprehensive if you stick with Applescript.

My advice is to avoid Applescript whenever possible, though. I find
Applescript a horrible language to write complicated scripts in, and
only use it for the simplest tasks.  It's only real advantage is that
it's always there if you have System 7.5.x.  If you really have a
complex task to do that needs to be done with Mac applications, check
into Frontier (you can find the way from www.scriptweb.com).

} 
} Any help is greatly appreciated.
} 
} Charles
} 
} -------------------------------------------------------------------------
} Charles Cave                                   Sydney, Australia
} charles@jolt.mpx.com.au
} -------------------------------------------------------------------------
} 
} 
---
--------
Paul J. Schinder
NASA Goddard Space Flight Center,
Code 693, Greenbelt, MD 20771 USA
schinder@pjstoaster.pg.md.us