Categories
AppleScript Notes

do shell script – hints

A copy of an email from Chris Espinosa from Apple.

do shell script hints

Categories
AppleScript Notes

Send Attachment with Mail.app

Using AppleScript to send an email with an attachment

Categories
AppleScript Notes

Another Terminal.app Scripting Example

See this script Terminal Window Here for a more detailed example of a Terminal.app AppleScript.

Categories
AppleScript Notes

POSIX path or POSIX file

POSIX path or POSIX file

set f to choose file — f is a file object

set p to POSIX path of f — p is Unicode text of the path

set f1 to POSIX file p — f1 is a file object again

set qp to quoted form of p — qp is a path string you can send to Terminal even if it contains spaces or special characters

Categories
AppleScript Notes

Logging out via AppleScript

From Chris Nebel of Apple’s AppleScript Engineering group

ignoring application responses
  tell application “loginwindow” to <>
end ignoring

The double pointy brackets around the raw event call should be replaced by option-backslash and shift-option-backslash.The “rlgo” is short for “really log out”; if you want the “are you sure you want to log out” dialog, use aevtlogo instead. A future version of AppleScript will have a real command similar to “shut down”.

Categories
AppleScript Notes

Extending BBEdit with Glossary Entries That Call AppleScripts

Studio Log – Articles

Extending BBEdit with Glossary Entries That Call AppleScripts

Categories
AppleScript Notes Unix Notes

Scripting Terminal.app

tell application "Terminal"
 do script with command "top -u -s10 10"
 set number of rows of window 1 to 18
 set number of columns of window 1 to 80
 set background color of window 1 to "black"
 set normal text color of window 1 to "yellow"
 set custom title of window 1 to "Top"
 set miniaturized of window 1 to true
end tell