SystemEvents

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.

  • Export Stickies text via Applescript

    by 
    Dave Caolo
    Dave Caolo
    02.08.2006

    As you may know, Apple's Stickies isn't directly scriptable via Applescript (technically, you can send a system event). Still, one enterprising soul has discovered a work around, and posted it to Mac OS X Hints. His script creates a new text file, one for each Sticky. Once you've got your text file, you can do whatever you wish with it.The script's author notes that his script only works on text for the time being; images will not be exported.As reader Eric notes, this script is for the Stickies application, not the Dashboard widget. Ignore the fact that I used an image of the widget for this post (it just looked so nice).