DisplayDialog

Latest

  • AppleScript: Finder commands

    by 
    Cory Bohon
    Cory Bohon
    12.29.2007

    Now that you've mastered the tell command, it's time to introduce some of the other AppleScript commands that you may encounter.Location commandThis command will allow you to open a specific location (either on your Mac or on a web server). This command is most often used with the Finder. For instance, if you wanted to open "www.tuaw.com," then you would type:tell application "Finder" to open location "http://www.tuaw.com"Remember, when dealing with an application always include quote marks around the application name. When you're typing a URL, be sure to include the prefix (HTTP:, AFP:, FTP:, etc.) and include quote marks around the URL. You can also tell a specific web browser to open the URL:tell application "Safari" to open location "http://www.tuaw.com"However, if you use the Finder version of the script, it will open your default browser.