Sunteți pe pagina 1din 2

RAR Expander Example AppleScripts

Copyright 2004-2006 Kris Gybels 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. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 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.

About the Scripts


RAR Expander includes basic support for AppleScript. A few example scripts are included which demonstrate some of the possibilities this offers. 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 find an Install Script Menu application in this folder, just open it. On MacOSX 10.4 (Tiger) you will find an application AppleScript Utility in this folder, open it, then check the "Show Script Menu in menu bar" option. You can find 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 affects the behavior of the example scripts as well.

Important Notice
Please note that the AppleScript support is currently experimental and thus may not function properly, the command syntax might still be changed etc.

Command Documentation
The RAR Expander AppleScript suite includes the single command 'expand':

expand: Expands the archive to the selected destination.


expand alias -- The file 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. The to argument is optional and if omitted expansion will occur as if the file 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 files 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.

S-ar putea să vă placă și