We'll start with opening a terminal window because it is easier.
- Launch AppleScript Editor
- Copy and paste the following code into the editor
tell application "Terminal"
do script ""
activate
end tell
- Save the file as ~/Library/Scripts/Open-Terminal.scpt
- Open Finder and go to the ~/Library/Scripts folder
- Open Quicksilver (if you do not have it install it from here)
- Click the small down arrow and click on Triggers
- Click the "+" sign to add a new HotKey
- Drag Open-Firefox.scpt from the Finder window into the window that opens
- Click on the Trigger column to change the Hot Key (shortcut key)
- Now when you press the Hot Key a new Terminal window should appear on whatever space you are currently on and open redirect.html which instantly loads www.google.com
- Launch AppleScript Editor
- Copy and paste the following code into the editor
tell application "Firefox"
open "~/Library/Scripts/redirect.html"
activate
end tell
this code tells Firefox to open and go to redirect.html - Save the file as ~/Library/Scripts/Open-Firefox.scpt
- Open Finder and go to the ~/Library/Scripts folder
- Create ~/Library/Scripts/redirect.html in a text editor and paste the following code into the file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Redirecting</title>
<meta http-equiv="REFRESH" content="0;url=http://www.google.com"></HEAD>
<BODY>
<p> Redirecting </p>
</BODY>
</HTML>
- Open Quicksilver (if you do not have it install it from here)
- Click the small down arrow and click on Triggers
- Click the "+" sign to add a new HotKey
- Drag Open-Terminal.scpt from the Finder window into the window that opens
- Click on the Trigger column to change the Hot Key (shortcut key)
- Now when you press the Hot Key a new Firefox window should appear on whatever space you are currently on
Awesome tip thanks Mark!
ReplyDelete