Difference between revisions of "Mac: Applescript"

From ReceptiveIT
Jump to: navigation, search
 
 
Line 12: Line 12:
 
=== Opening a network location ===
 
=== Opening a network location ===
 
  tell application "Finder"
 
  tell application "Finder"
open location "smb://server/share"
+
open location "smb://server/share"
 
  end tell
 
  end tell

Latest revision as of 15:39, 22 January 2010

I have just started playing with ApplesScript, and I wanted to document some common things that I get asked to do.

Getting Started

You will find the Script Editor in the Utilities menu of OSX

Saving Executable Scripts

When you click on File -> Save As you should save the script with the file format of Application, and it might be a good idea to untick Startup Screen for silent execution

Examples

Opening a network location

tell application "Finder"
	open location "smb://server/share"
end tell