This is an AppleScript that I used with BBEdit to make the text-indent commands behave the way I expected. It has two known defects:
- When multiple lines are selected, they don’t stay that way
- Errors get thrown in end-of-document cases
Beyond that, you’re on your own.
on menuselect(menuName, itemName)
return false
end menuselect
on postmenuselect(menuName, itemName)
tell application "BBEdit"
tell text window 1
select insertion point before last character of selection
end tell
end tell
end postmenuselect
AppleScript |
Permalink
| No Comments
Posted
September 22, 2003
at 10:08 am
Updated
December 4, 2008
This is a quick AppleScript I threw together to launch Quicken. I keep my Quicken data files on a PGPDisk, so when I click the Quicken icon on my dock, something has to happen before Quicken can launch, thus this script.
-- Script property to save the image we're supposed to mount
property diskImage : missing value
-- If the property has a value, but it doesn't point anywhere
tell application "Finder" to exists diskImage
if diskImage is not missing value and the result is false then
display dialog ¬
"The disk image is missing. Please choose another." with icon stop
if dialog reply is "Cancel" then
return
end if
set diskImage to missing value
end if
-- Ask the user, if needed, and mount the image
activate
if diskImage is missing value then
choose file of type "pgd" with prompt "Select the Finances PGP Disk"
set diskImage to the result
end if
tell application "PGP"
activate
open diskImage
end tell
-- Switch to Quicken, and we're done
tell application "Quicken 2004" to activate
AppleScript |
Permalink
| No Comments
Posted
August 29, 2003
at 2:13 pm