Safari Keyboard Shortcuts

Safari is the fast and lean default web browser bundled with Mac safari_OS X. You probably already know a shortcut or two, but there are tons of shortcuts in Safari worth remembering that can really improve your experience browsing the web. We’ll cover 31 different keystrokes, they are grouped into different sections based on use case, and we’ve also included a few multi-touch gestures for those of us with multitouch capable Macs.

8 Shortcuts for Navigating Tabs & Web Pages

  • Switch to Next Tab – Control+Tab
  • Switch to Previous Tab – Control+Shift+Tab
  • Scroll Down by Full Screen – Spacebar
  • Scroll Up by Full Screen – Shift+Spacebar
  • Go to Address Bar – Command+L
  • Open New Tab – Command+T
  • Open Link in New Tab – Command+Click a link
  • Add Linked Page to Reading List – Shift+Click link

7 Shortcuts for Reading & Viewing Pages

  • Strip Styling and View in Reader – Command+Shift+R
  • Increase Text Size – Command+Plus
  • Decrease Text Size – Command+Minus
  • Default Text Size – Command+0
  • Enter or Exit Full Screen – Command+Escape
  • Open Home Page – Command+Shift+H
  • Mail Link to Current Page – Command+Shift+I

5 Shortcuts for Caches, Loading Pages, Source, and Pop Ups

  • Empty Browser Cache – Command+Option+E
  • Reload Page – Command+R
  • Stop Loading Page – Command+.
  • View Page Source – Command+Option+U
  • Disable Pop Up Windows – Command+Shift+K

3 Shortcuts for Finding and Navigating Found Items

  • Find Text on Page – Command+F
  • Navigate Found Items Forward – Return
  • Navigate Found Items Backwards – Shift+Return

8 Shortcuts for Toolbars, History, and Reading List

  • Hide or Show Toolbar – Command+i
  • Hide or Show Bookmarks Bar – Command+Shift+B
  • Hide or Show Status Bar – Command+/
  • Hide or Show Tab Bar – Command+Shift+T
  • Show Top Sites – Command+Option+1
  • Show History – Command+Option+2
  • Show Reading List – Command+Shift+L
  • Show Downloads – Command+Option+L

Bonus: 4 Safari Multi-Touch Gestures

  • Go Back – Two Finger Swipe Left
  • Go Forward – Two Finger Swipe Right
  • Zoom Out / Decrease Font Size – Pinch
  • Zoom In / Increase Font Size – Spread / Reverse Pinch

Reading a Text File Into an AppleScript Variable

This is one of those things that you’ll probably do a lot. It’s not too hard in AppleScript but there are a few tricks. Note that there are a wide variety of ways to read from a file, such as reading in a certain number of characters, or until a certain character is encountered.

Reading a Text File Script Screenshot :

Reading a Text file Into an AppleScript Variable

Reading a Text file Into an AppleScript Variable

I generally prefer to read the entire file into a variable and work from there for speed and simplicity.

Apple Script Source Code :

set theFile to (choose file with prompt “Select a file to read:” of type {“TEXT”})

open for access theFile

set fileContents to (read theFile)

close access theFile


Mac OS X Uninstaller Apple Script

The script uses “properties”, that work as variables global to the entire script (and whose value is saved in the script throught diferent sessios, if it changes).

Dialog (”display dialog”) are used in order to prompt the user, and the answer is evaluated. The script uses the Finder in order to delete folders and items.

Code Screenshot:

Mac OS X Uninstaller Apple Script

Mac OS X Uninstaller Apple Script

Apple Script Source Code:

property root_items : {“bin”, “dev”, “Network”, “private”, “sbin”, “usr”, “Volumes”, “.DS_Store”, “.hidden”, “cores”, “etc”, “tmp”, “var”, “Applications”, “Developer”, “Library”, “mach”, “mach.sym”, “mach_kernel”, “System”, “.Trashes”, “Users”, “.vol”}

property systemfolder_items : {“Classic”, “Classic Support”, “Classic Support UI”, “ProxyApp”}

tell application “Finder”

activate

try

set this_version to the version as string

display dialog “This script will move Mac OS X items from the startup disk “ & “to the trash.” with icon 2

display dialog “Should this script delete the Users folder?” buttons {“Cancel”, “Yes”, “No”} default button 3

set the users_flag to the button returned of the result

repeat with i from 1 to the count of the root_items

set this_item to item i of the root_items

if this_item is not “Users” or the users_flag is “Yes” then

if exists (item this_item of the startup disk) then

delete item this_item of the startup disk

end if

end if

end repeat

repeat with i from 1 to the count of the systemfolder_items

set this_item to item i of the systemfolder_items

if exists (item this_item of the system folder) then

delete item this_item of the system folder

end if

end repeat

beep

display dialog “The Mac OS X items have been placed in the Trash.”

on error error_message number error_number

if the error_number is not -128 then

beep

display dialog error_message buttons {“Cancel”} default button 1

end if

end try

end tell