You are on page 1of 2

RAR Expander

Example AppleScripts
Copyright 2004-2006 Kris Gyels
This program is free software; you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
!his program is distri"ted in the hope that it #ill e "se$"l% "t &'!()*!
A+, &ARRA+!,- #itho"t e.en the implied #arranty o$ /ERC(A+!A0'1'!,
or 2'!+ESS 2)R A 3AR!'C*1AR 3*R3)SE4 See the G+* General 3"lic
1icense $or more details4
You should have received a copy of the GNU General Public License along with this program; if
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-
1307, USA.
Ao"t the Scripts
RAR Expander includes basic support for AppleScript. A few example scripts are
included which demonstrate some of the possibilities this ofers. These scripts
were designed to be used from the script menu.
If you have not activated the script menu yet, you can do so on recent versions of
MacOSX by opening the AppleScript folder of the Applications folder. On
MacOSX 10.3 (Panther) you will fnd an Install Script Menu application in this
folder, just open it. On MacOSX 10.4 (Tiger) you will fnd an application
AppleScript Utility in this folder, open it, then check the "Show Script Menu in
menu bar" option. You can fnd some more information about the Script Menu on
Apple's website: http://www.apple.com/applescript/scriptmenu/
To include the example scripts in the script menu, you should copy them to the
Scripts folder of the Library folder in your home folder. Once copied the scripts
will automatically be included in the script menu.
A basic explanation of the function of the scripts is given when you use them. You
are of course welcome to customize them to your own needs. If you write a new
generally useful script or have feedback on the AppleScript support, please don't
hesitate to mail the author (contact details can be found on the RAR Expander
website).
Please keep in mind the following important notice about RAR Expander's
AppleScript support, which afects the behavior of the example scripts as well.
'mportant +otice
Please note that the AppleScript support is currently experimental and thus
may not function properly, the command syntax might still be changed etc.
Command 5oc"mentation
The RAR Expander AppleScript suite includes the single command 'expand':
expand6 Expands the archive to the selected destination.
expand alias -- The fle to expand.
[to alias] -- The destination folder to which to expand. (default: user's
preference)
This expands the archive pointed to by the given alias. Theto argument is
optional and if omitted expansion will occur as if the fle was opened by the user
using the Expand menu item in the File menu. When the to argument is passed
the archive will be expanded to the given destination folder, no surrounding folder
will be created but fles in the destination folder will not be overwritten.
Upon successful expansion, expand returns a list of strings containing the UNIX
path of all RAR volumes that were processed. If an error occurred the empty list
is returned.

You might also like