open -a Safari
Another cool thing you can do with this is open multiple instances of an application. Just tack on the -n flag:
open -n -a Safari
open -a Safari
open -n -a Safari


property the_app : "QuickTime Player"
tell application "Finder"
set the_selection to the selection
end tell
repeat with each_item in the_selection
do shell script ("open -a " & (quoted form of the_app) & space & (quoted form of (POSIX path of (each_item as alias))))
end repeat

<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.yourname.appname</string>







defaults write com.apple.finder CreateDesktop -bool false; killall Finderdefaults write com.apple.finder CreateDesktop -bool true; killall Finder
tell application "System Events" to set Front_App to name of (first application process whose frontmost is true)
tell application Front_App
display dialog "Duuuuude."
end tellset searched_string to the_original_string_variable
set search_for to "this is what you want to find"
set replace_with to "this is what you want to replace with"
set the_new_string to searched_string
if searched_string contains search_for then
set old_delims to AppleScript's text item delimiters
set AppleScript's text item delimiters to search_for
set the_text_list to every text item of searched_string
set AppleScript's text item delimiters to replace_with
set the_new_string to the_text_list as string
set AppleScript's text item delimiters to old_delims
end if
set the_original_string_variable to the_new_stringset theSender to "send_from@example.com"
set recipAddress to "send_to@example.com"
set theSubject to ("The Subject Line")
tell application "Mail"
set newmessage to make new outgoing message
tell newmessage
set sender to theSender
set subject to theSubject
make new to recipient with properties {address:recipAddress}
end tell
set visible of newmessage to true
send newmessage
end tell



networksetup -listallnetworkservicesnetworksetup -setnetworkserviceenabled Ethernet offnetworksetup -setnetworkserviceenabled Ethernet onproperty the_password : "An Admin Password"
property network_name : "Ethernet"
set enabled_q to do shell script "networksetup -getnetworkserviceenabled '" & network_name & "'"
if enabled_q is "Enabled" then
do shell script "networksetup -setnetworkserviceenabled '" & network_name & "' off" password the_password with administrator privileges
return "off"
else
do shell script "networksetup -setnetworkserviceenabled '" & network_name & "' on" password the_password with administrator privileges
return "on"
end if
property the_list : " set AppleScript's text item delimiters to "
"set the_text_list to every text item of the_listset applescript's text item delimiters to ""set the_text_item to item 1 of the_text_list
try
set the_text_list to items 2 thru -1 of the_text_list
on error err
log err
set the_text_list to "End of list."
end try
set the clipboard to the_text_itemset AppleScript's text item delimiters to "
"
set the_list to the_text_list as string
set AppleScript's text item delimiters to ""return the clipboard

beeptell application "GrowlHelperApp" to register as application "Wakeup Notification" all notifications {"Internet On"} default notifications {"Internet On"} icon of application "AirPort Utility"tell application "GrowlHelperApp" to notify with name "Internet On" title "Internet On" description "The internet is now active." application name "Wakeup Notification"nano ~/.wakeuppinggoog=`ping -t 120 -o 74.125.45.100`
if [ `echo $pinggoog | grep -c '100% packet loss'` -gt 0 ] ; then
echo failed
else
chmod +x ~/.wakeup~/.wakeupon process(the_selection)
return "♥"
end process


tell application "System Preferences"
run
set current pane to pane "com.apple.preference.displays"
tell application "System Events"
set value of slider 1 of group 2 of tab group 1 of window "Color LCD" of process "System Preferences" to 0.0
end tell
quit
end telltell application "System Events"
if ((get name of the processes) does not contain "Mail") then
tell application "Mail"
run
end tell
end if
end tell
tell application "Mail"
check for new mail
end tell
property app_name : "iTunes"
tell application "System Events"
set front_app to name of (first application process whose frontmost is true)
end tell
if front_app is app_name then
tell application "System Events" to set visible of first application process whose frontmost is true to false
else
tell application app_name to activate
end iftell application "iTunes" to set play_state to player state as string
if play_state is "paused" then
if (output volume of (get volume settings)) is 0 then set volume 2
tell application "iTunes" to play
else
tell application "iTunes" to pause
end ifset volume 10set mute_status to (item -1 of ((get volume settings) as list))
if mute_status is false then
set volume with output muted
set mute_status to 1
tell application "System Events"
if (name of every process as string) contains "iTunes" then
tell application "iTunes" to pause
end if
end tell
else if mute_status is true then
set volume without output muted
set mute_status to 0
tell application "System Events"
if (name of every process as string) contains "iTunes" then
tell application "iTunes" to play
end if
end tell
end if
beepset volume 0
tell application "System Events"
if (name of every process as string) contains "iTunes" then
tell application "iTunes" to pause
end if
end tell
beep>tell application "Safari"
set the bounds of the first window to {0, 0, 1440, 900}
end telltell application "Safari"
set this_win to (window 1)
repeat with j from 1 to the count of every tab in this_win
do JavaScript "window.location.reload()" in (tab j of window 1)
end repeat
end tell

defaults write com.apple.screencapture name [string]
<key>UUID</key>
<string>8C42DC22-6794-42FA-94B7-1A4144DDD596</string>
<key>identifier</key>
<string>com.apple.Automator.Variable.Text</string>
<key>name</key>
<string>Variable Name</string>
<key>value</key>
<string>What you saved the variable as.</string>