Congratulations, you’ve finished your initial foray into the world of AppleScript. You’ve learned what AppleScript is, how it works, and how to script the Finder application to control the display of Finder windows.
Zak McKracken and the Alien Mindbenders is a classic point-and-click adventure with four controllable characters. Solve puzzles and interact with the crazy world using the old school verb command interface. Go on adventures all across the globe and even into space. Bender Runs on a Mac OS Bender went to Bending School, and after he graduated he vowed it was 'time to bend around Europe for a few months, then get a job bending.' What kind of school was it?.
In addition to creating a useful script tool, you’ve learned these important AppleScript concepts:
- On the computer, everything is an object.
- On the computer, everything belongs to, is related to, is contained in, or is part of something else. For example, the Finder application contains windows and folders.
- Scriptable objects are referred to by their positions in their object hierarchy or where they are in their “chain of command.” For example:
file 'cars.pdf' of folder 'Documents' of folder 'sal' of folder 'Users' of startup disk - Scriptable objects have properties with values that can be read and sometimes manipulated. For example, a Finder window has name, position, and bounds properties.
- The AppleScript verb get is used to retrieve the value of a property, as in:
get the name of the front window - The AppleScript verb set is used to alter the value of editable properties, as in:
set the position of the front window to {0, 44} - Scripts are written using single-line tell statements or multiple-line tell blocks that target one or more actions at a scriptable object.
- Textual content used in a script is placed within straight quotation marks ( ' ' ).
- Lists in AppleScript begin with the opening brace character ( { ), contain items separated by commas, and end with a closing brace character ( } ).
Finder Window Properties
For reference, the following is a summary of the Finder window properties and commands used to create the Desktop Setup script. Review these items, keeping in mind that the principles you’ve learned here apply to all scriptable applications, not just the Finder.
Read-Only Properties
Verb Benders Mac Os Catalina
Read-only properties are properties whose corresponding values can be accessed or read only; they cannot be changed.
name: the text displayed in the title bar of the window
tell application 'Finder' to get the name of the front window
Editable Properties
Editable properties are properties whose corresponding values can be both read and changed.
index: an integer (whole number) indicating the position of the window in the stack of open windows
tell application 'Finder' to get the index of the front window
bounds: a list of coordinates defining the top-left and bottom-right corners of a window
tell application 'Finder' to set the bounds of Finder window 1 to {0, 44, 400, 300}
collapsed: a true or false value indicating whether the window has been minimized to the Dock
tell application 'Finder' toset collapsed of every window to false
current view: the method currently used to display content in the window. Values for this property are one of the following: icon view, list view, column view, and, in Leopard, flow view
tell application 'Finder' to set the current view of Finder window 1 to icon view
position: a list of coordinates indicating the horizontal and vertical offset of the window from the left and top sides of the screen
tell application 'Finder' to set the position of the front Finder window to {0, 22}
target: a reference to the folder or directory whose contents are displayed in the window.
tell application 'Finder' to set the target of the front Finder window to home
toolbar visible: (Mac OS X 10.3) a true or false value that indicates whether the Finder window displays a toolbar.
tell application 'Finder' to set toolbar visible of the front Finder window to false
statusbar visible: (Mac OS X 10.4) a true or false value that indicates whether the Finder window displays a status bar. This works only when the toolbar is not visible.
tell application 'Finder' to set statusbar visible of the front Finder window to false
sidebar width: (Mac OS X 10.4) an integer value that indicates the width of the Finder window’s sidebar in pixels. To close the sidebar in Mac OS X 10.4 (Tiger) without hiding the toolbar or the status bar, assign this property a value of 0. In Leopard, setting the sidebar width property to 0 reduces it to a width of 135 pixels.
tell application 'Finder' to set the sidebar width of the front Finder window to 0
zoomed: a true or false value that indicates whether the window has been expanded.
tell application 'Finder' to set zoomed of the front Finder window to true
Referring to a Finder Window
Finder windows, and other scriptable objects as well, can be referenced in a variety of ways:
by name:
Finder window 'Documents'
by numeric index:
Finder window 1
by descriptive index:
the first Finder window
the second Finder window
the fifth Finder window
the 1st Finder window
the 23rd Finder window
by By position relative to other windows:
the front Finder window
the middle Finder window
the back Finder window
the last Finder window
the Finder window before the last Finder window
the Finder window after the first Finder window
by random index:
some Finder window
Verbs Used with Finder Windows
AppleScript verbs are the commands targeted at scriptable objects to retrieve or manipulate property values and to perform actions with the scriptable objects.
Accessing the Values of a Window’s Property
get: used to access the current values of a window property.
tell application 'Finder' to get the target of the front Finder window
Changing the Values of a Window’s Property
set: used to apply a new value to a window property.
tell application 'Finder' to set the target of the front Finder window to home
Controlling Windows
open: causes a window to become visible in the Finder
tell application 'Finder' to open the Finder window of the startup disk
tell application 'Finder' to open the startup disk
close: causes a window to close
tell application 'Finder' to close every Finder window
select: causes a window to come to the front
tell application 'Finder' to select the last Finder window
The Tell Statement
A tell statement is a single AppleScript statement, beginning with the verb tell, that contains a reference to the target object and the action to be performed:
tell application 'Finder' to set the target of the last Finder window to home
The target object in this example is the last Finder window displayed on the Desktop. The action to be performed is to change the contents of the window by altering the value of the window’s target property to be the user’s home directory.
The Tell Block
Use tell blocks to replace multiple tell statements and target multiple actions at a scriptable object or objects. All tell blocks begin with the verb tell followed by a reference to a target object or parent application. Statements defining the actions to be performed are placed after the opening line, with each statement getting its own line. The tell block is closed with the statement end tell.
tell application 'Finder'
set the target of the front Finder window to home
set the current view of the front Finder window to icon
set the position of the front Finder window to {0, 22}
end tell
tell blocks within other tell blocks are called nested tell blocks. When compiled, the hierarchy of the scriptable objects is revealed by the indentation applied to the formatted script text.
tell application 'Finder'
tell the front Finder window
set the target to home
set the current view to icon
set the position to {0, 22}
end tell
end tell
TOP CONTINUE
Software Downloads
Which version of NAMD should I download?
The versions of NAMD below are distinguished first by OS, followed by the type of network interface, and whether or not CUDA is supported. If you are installing NAMD on a standalone workstation, we recommend downloading Linux-x86_64-multicore for Linux or Win64 for Windows. If your workstation has a CUDA-capable GPU, you should try downloading Linux-x86_64-multicore-CUDA or Win64-CUDA. If you wish to run multi-copy algorithms, such as replica-exchange MD, you should try the 'netlrts' builds, such as Linux-x86_64-netlrts or Linux-x86_64-netlrts-smp-CUDA.
If you have a modern NVIDIA GPU (Pascal or newer), you might also be interested to try the new version 3.0 alpha, which includes the option of running standard MD simulations entirely on a single GPU for much faster performance. See the support web page for more information.
Download NAMD:
NAMD is a parallel, object-oriented molecular dynamics code designed for high-performance simulation of large biomolecular systems. Simulation preparation and analysis is integrated into the visualization package VMD.Visit the NAMD website for complete information and documentation.
Selecting an archive below will lead to a user registration and login page. Your download will continue after you have registered or logged in.
Version Nightly Build (2021-05-02) Platforms:
- Linux-x86_64-multicore (64-bit Intel/AMD single node)
- Linux-x86_64-multicore-CUDA (NVIDIA CUDA acceleration)
Version 3.0 GPU-Resident Single-Node-Per-Replicate ALPHA Release (2020-11-16) Platforms:
- Linux-x86_64-multicore-CUDA-SingleNode (NVIDIA CUDA acceleration (single-node))
- Linux-x86_64-netlrts-smp-CUDA-SingleNode (NVIDIA CUDA acceleration, multi-copy algorithms, single process per copy)
Version 2.15 ALPHA Release (2020-11-03) Platforms:
- Linux-x86_64-multicore-AMDHIP (AMD HIP/ROCm acceleration)
- Linux-x86_64-multicore-AVX512 (x86_64 AVX-512)
Verb Benders Mac Os 11
Version 2.14 (2020-08-05) Platforms:
- Linux-x86_64-multicore (64-bit Intel/AMD single node)
- Linux-x86_64-multicore-CUDA (NVIDIA CUDA acceleration)
- Linux-x86_64-netlrts (Multi-copy algorithms, single host or ethernet)
- Linux-x86_64-netlrts-smp-CUDA (Multi-copy algorithms, single process per copy)
- Linux-x86_64-verbs (InfiniBand, no MPI needed, supports multi-copy algorithms)
- Linux-x86_64-verbs-smp (InfiniBand, no MPI needed, supports multi-copy algorithms)
- Linux-x86_64-verbs-smp-CUDA (InfiniBand, no MPI needed, supports multi-copy algorithms)
- Linux-KNL-multicore (Intel Xeon Phi KNL processor single node)
- MacOSX-x86_64 (Mac OS X for 64-bit Intel processors)
- MacOSX-x86_64-CUDA (NVIDIA CUDA acceleration)
- MacOSX-x86_64-netlrts (Multi-copy algorithms)
- Win64 (Windows 7, 8, 10, etc.)
- Win64-CUDA (NVIDIA CUDA acceleration)
- Win64-MPI (Windows HPC Server, multi-copy algorithms)
- Win64-MPI-smp-CUDA (HPC Server with CUDA)
Version 2.13 (2018-11-09) Platforms:
- Linux-x86_64-multicore (64-bit Intel/AMD single node)
- Linux-x86_64 (64-bit Intel/AMD with ethernet)
- Linux-x86_64-TCP (TCP may be better on gigabit)
- Linux-x86_64-ibverbs (InfiniBand via OpenFabrics OFED, not for Omni-Path, no MPI needed)
- Linux-x86_64-ibverbs-smp (InfiniBand plus shared memory, no MPI needed)
- Linux-x86_64-multicore-CUDA (NVIDIA CUDA acceleration)
- Linux-x86_64-ibverbs-smp-CUDA (NVIDIA CUDA with InfiniBand)
- Linux-x86_64-netlrts (Multi-copy algorithms, single host or ethernet)
- Linux-x86_64-netlrts-smp-CUDA (Multi-copy algorithms, single process per copy)
- Linux-x86_64-verbs (InfiniBand, no MPI needed, supports multi-copy algorithms)
- Linux-x86_64-verbs-smp (InfiniBand, no MPI needed, supports multi-copy algorithms)
- Linux-x86_64-verbs-smp-CUDA (InfiniBand, no MPI needed, supports multi-copy algorithms)
- Linux-KNL-multicore (Intel Xeon Phi KNL processor single node)
- MacOSX-x86_64 (Mac OS X for 64-bit Intel processors)
- MacOSX-x86_64-CUDA (NVIDIA CUDA acceleration)
- MacOSX-x86_64-netlrts (Multi-copy algorithms)
- Win64 (Windows 7, 8, 10, etc.)
- Win64-CUDA (NVIDIA CUDA acceleration)
- Win64-MPI (Windows HPC Server, multi-copy algorithms)
- Win64-MPI-smp-CUDA (HPC Server with CUDA)
Version 2.12 (2016-12-22) Platforms:
- Linux-x86_64-multicore (64-bit Intel/AMD single node)
- Linux-x86_64 (64-bit Intel/AMD with ethernet)
- Linux-x86_64-TCP (TCP may be better on gigabit)
- Linux-x86_64-ibverbs (InfiniBand via OpenFabrics OFED, not for Omni-Path, no MPI needed)
- Linux-x86_64-ibverbs-smp (InfiniBand plus shared memory, no MPI needed)
- Linux-x86_64-multicore-CUDA (NVIDIA CUDA acceleration)
- Linux-x86_64-ibverbs-smp-CUDA (NVIDIA CUDA with InfiniBand)
- Linux-x86_64-netlrts (Multi-copy algorithms, single host or ethernet)
- Linux-x86_64-verbs (InfiniBand, no MPI needed, supports multi-copy algorithms)
- Linux-x86_64-verbs-smp (InfiniBand, no MPI needed, supports multi-copy algorithms)
- Linux-x86_64-verbs-smp-CUDA (InfiniBand, no MPI needed, supports multi-copy algorithms)
- Linux-KNL-multicore (Intel Xeon Phi KNL processor single node)
- MacOSX-x86_64 (Mac OS X for 64-bit Intel processors)
- MacOSX-x86_64-CUDA (NVIDIA CUDA acceleration)
- MacOSX-x86_64-netlrts (Multi-copy algorithms)
- Win32 (Windows XP, etc.)
- Win64 (Windows 7, 8, 10, etc.)
- Win64-CUDA (NVIDIA CUDA acceleration)
- Win64-MPI (Windows HPC Server, multi-copy algorithms)
- Win64-MPI-smp-CUDA (HPC Server with CUDA)
Version 2.11 (2015-12-22) Platforms:
- Linux-x86_64-multicore (64-bit Intel/AMD single node)
- Linux-x86_64 (64-bit Intel/AMD with ethernet)
- Linux-x86_64-TCP (TCP may be better on gigabit)
- Linux-x86_64-ibverbs (InfiniBand via OpenFabrics OFED, not for Omni-Path, no MPI needed)
- Linux-x86_64-ibverbs-smp (InfiniBand plus shared memory, no MPI needed)
- Linux-x86_64-multicore-CUDA (NVIDIA CUDA acceleration)
- Linux-x86_64-ibverbs-smp-CUDA (NVIDIA CUDA with InfiniBand)
- Linux-x86_64-multicore-MIC (Intel Xeon Phi coprocessor acceleration)
- Linux-x86_64-netlrts (Multi-copy algorithms, single host or ethernet)
- Linux-x86_64-verbs (InfiniBand, no MPI needed, supports multi-copy algorithms)
- Linux-x86_64-verbs-smp (InfiniBand, no MPI needed, supports multi-copy algorithms)
- Linux-x86_64-verbs-smp-CUDA (InfiniBand, no MPI needed, supports multi-copy algorithms)
- MacOSX-x86_64 (Mac OS X for 64-bit Intel processors)
- MacOSX-x86_64-CUDA (NVIDIA CUDA acceleration)
- MacOSX-x86_64-netlrts (Multi-copy algorithms)
- Win32 (Windows XP, etc.)
- Win64 (Windows 7, 8, 10, etc.)
- Win64-CUDA (NVIDIA CUDA acceleration)
- Win64-MPI (Windows HPC Server, multi-copy algorithms)
- Win64-MPI-smp-CUDA (HPC Server with CUDA)
Version 2.10 (2014-12-11) Platforms:
- Linux-x86_64-multicore (64-bit Intel/AMD single node)
- Linux-x86_64 (64-bit Intel/AMD with ethernet)
- Linux-x86_64-TCP (TCP may be better on gigabit)
- Linux-x86_64-ibverbs (InfiniBand via OpenFabrics OFED, not for Omni-Path, no MPI needed)
- Linux-x86_64-ibverbs-smp (InfiniBand plus shared memory, no MPI needed)
- Linux-x86_64-multicore-CUDA (NVIDIA CUDA acceleration)
- Linux-x86_64-ibverbs-smp-CUDA (NVIDIA CUDA with InfiniBand)
- Linux-x86_64-multicore-MIC (Intel Xeon Phi coprocessor acceleration)
- Linux-x86_64-netlrts (Multi-copy algorithms, single host or ethernet)
- MacOSX-x86_64 (Mac OS X for 64-bit Intel processors)
- MacOSX-x86_64-netlrts (Multi-copy algorithms)
- Win64 (Windows 7, 8, 10, etc.)
- Win64-CUDA (NVIDIA CUDA acceleration)
- Win64-MPI (Windows HPC Server, multi-copy algorithms)
Version 2.9 (2012-04-30) Platforms:
- Linux-x86 (32-bit Intel/AMD with ethernet)
- Linux-x86-TCP (TCP may be better on gigabit)
- Linux-x86_64-multicore (64-bit Intel/AMD single node)
- Linux-x86_64 (64-bit Intel/AMD with ethernet)
- Linux-x86_64-TCP (TCP may be better on gigabit)
- Linux-x86_64-ibverbs (InfiniBand via OpenFabrics OFED, not for Omni-Path, no MPI needed)
- Linux-x86_64-ibverbs-smp (InfiniBand plus shared memory, no MPI needed)
- Linux-x86_64-multicore-CUDA (NVIDIA CUDA acceleration)
- Linux-x86_64-ibverbs-smp-CUDA (NVIDIA CUDA with InfiniBand)
- MacOSX-x86_64 (Mac OS X for 64-bit Intel processors)
- MacOSX-x86 (Mac OS X for Intel processors, fails on 10.7 'Lion')
- Win32 (Windows XP, etc.)
- Win64-MPI (Windows HPC Server, multi-copy algorithms)
Version 2.8 (2011-05-31) Platforms:
- AIX-POWER-lapi (IBM POWER clusters)
- AIX-POWER-multicore (IBM POWER single node)
- Linux-x86 (32-bit Intel/AMD with ethernet)
- Linux-x86-TCP (TCP may be better on gigabit)
- Linux-x86_64-multicore (64-bit Intel/AMD single node)
- Linux-x86_64 (64-bit Intel/AMD with ethernet)
- Linux-x86_64-TCP (TCP may be better on gigabit)
- Linux-x86_64-ibverbs (InfiniBand via OpenFabrics OFED, not for Omni-Path, no MPI needed)
- Linux-x86_64-ibverbs-smp (InfiniBand plus shared memory, no MPI needed)
- Linux-x86_64-CUDA (NVIDIA CUDA acceleration)
- Linux-x86_64-ibverbs-CUDA (NVIDIA CUDA with InfiniBand)
- MacOSX-x86_64 (Mac OS X for 64-bit Intel processors)
- MacOSX-PPC (Mac OS X for PowerPC)
- MacOSX-x86 (Mac OS X for Intel processors, fails on 10.7 'Lion')
- Win32 (Windows XP, etc.)
- Win64-MPI (Windows HPC Server, multi-copy algorithms)
Version 2.7 (2010-10-15) Platforms:
- AIX-POWER (IBM POWER)
- AIX-POWER-MPI (IBM POWER clusters)
- Linux-x86 (32-bit Intel/AMD with ethernet)
- Linux-x86-TCP (TCP may be better on gigabit)
- Linux-x86_64 (64-bit Intel/AMD with ethernet)
- Linux-x86_64-TCP (TCP may be better on gigabit)
- Linux-x86_64-ibverbs (InfiniBand via OpenFabrics OFED, not for Omni-Path, no MPI needed)
- Linux-x86_64-CUDA (NVIDIA CUDA acceleration)
- Linux-x86_64-ibverbs-CUDA (NVIDIA CUDA with InfiniBand)
- Linux-Itanium-Altix (original SGI Altix, not Altix UV)
- MacOSX-PPC (Mac OS X for PowerPC)
- MacOSX-x86 (Mac OS X for Intel processors, fails on 10.7 'Lion')
- Win32 (Windows XP, etc.)
Version 2.6 (2006-08-31) Platforms:
- AIX-POWER (IBM POWER)
- AIX-POWER-MPI (IBM POWER clusters)
- BlueGeneL (bypasses MPI for better scaling)
- BlueGeneP-MPI (Blue Gene/P)
- Linux-amd64-Clustermatic5-TCP (Clustermatic 5)
- Linux-x86 (32-bit Intel/AMD with ethernet)
- Linux-x86-TCP (TCP may be better on gigabit)
- Linux-x86_64 (64-bit Intel/AMD with ethernet)
- Linux-x86_64-TCP (TCP may be better on gigabit)
- Linux-i686-Clustermatic4 (Clustermatic 4 or 5)
- Linux-i686-Clustermatic4-TCP (TCP may be better on gigabit)
- Linux-i686-Scyld29 (Scyld Beowulf 29)
- Linux-i686-Scyld29-TCP (TCP may be better on gigabit)
- Linux-Itanium (Itanium)
- Linux-Itanium-Altix (original SGI Altix, not Altix UV)
- MacOSX-PPC-xlC (Mac OS X for PowerPC, needs IBM libraries)
- MacOSX-x86 (Mac OS X for Intel processors, fails on 10.7 'Lion')
- Origin2000 (any SGI, shared-memory only)
- Origin2000-MPI (SGI MPI)
- Tru64-Alpha-Elan (AlphaServer SC with Quadrics)
- Tru64-Alpha-MPI (HP MPI, no Quadrics or Elan)
- Win32 (Windows XP, etc.)
Version 2.5 (2003-09-29) Platforms:
- AIX-POWER (IBM POWER)
- AIX-POWER-MPI (IBM POWER clusters)
- Linux-x86 (32-bit Intel/AMD with ethernet)
- Linux-x86-TCP (TCP may be better on gigabit)
- Linux-i686-Clustermatic (Clustermatic 3)
- Linux-i686-Clustermatic-TCP (TCP may be better on gigabit)
- Linux-i686-Scyld (Scyld Beowulf)
- Linux-i686-Scyld-TCP (TCP may be better on gigabit)
- MacOSX-PPC (Mac OS X for PowerPC)
- Origin2000 (any SGI, shared-memory only)
- Origin2000-MPI (SGI MPI)
- Solaris-Sparc-MPI (Sun HPC ClusterTools)
- Tru64-Alpha-Elan (AlphaServer SC with Quadrics)
- Tru64-Alpha-MPI (HP MPI, no Quadrics or Elan)
- Win32 (Windows XP, etc.)
Version 2.4 (2002-03-11) Platforms:
- AIX-POWER (IBM POWER)
- AIX-POWER-MPI (IBM POWER clusters)
- Linux-x86 (32-bit Intel/AMD with ethernet)
- Linux-i686-Scyld (Scyld Beowulf)
- MacOSX-PPC (Mac OS X for PowerPC)
- Origin2000 (any SGI, shared-memory only)
- Origin2000-MPI (SGI MPI)
- Solaris-Sparc-MPI (Sun HPC ClusterTools)
- Tru64-Alpha-Elan (AlphaServer SC with Quadrics)
- Win32 (Windows XP, etc.)
Version 2.3 (2001-08-02) Platforms:
- AIX-POWER (IBM POWER)
- AIX-POWER-MPI (IBM POWER clusters)
- Linux-x86 (32-bit Intel/AMD with ethernet)
- Linux-i686-Scyld (Scyld Beowulf)
- MacOSX-PPC (Mac OS X for PowerPC)
- Origin2000 (any SGI, shared-memory only)
- Origin2000-MPI (SGI MPI)
- Solaris-Sparc-MPI (Sun HPC ClusterTools)
- Tru64-Alpha-Elan (AlphaServer SC with Quadrics)
- Win32 (Windows XP, etc.)
Version 2.2 (2000-09-29) Platforms:
- AIX-POWER (IBM POWER)
- AIX-POWER-MPI (IBM POWER clusters)
- Linux-x86 (32-bit Intel/AMD with ethernet)
- Origin2000 (any SGI, shared-memory only)
- Origin2000-MPI (SGI MPI)
- Win32 (Windows XP, etc.)
Version 2.1 (1999-11-11) Platforms:
- AIX-POWER (IBM POWER)
- Linux-x86 (32-bit Intel/AMD with ethernet)
- Origin2000 (any SGI, shared-memory only)
- Origin2000-MPI (SGI MPI)