Re: Applescript equivalent of Ctrl-O (open line)

2011-01-20 Thread Kendall Conrad
It looks like I was over-thinking it. I didn't realize you _only_ needed to handle the case when you were at the end of a line. I was thinking of vim's command that will create a new line below/above your current position, no matter where your cursor was currently at on a line. The scripts I gave

Re: Applescript equivalent of Ctrl-O (open line)

2011-01-19 Thread Roland Küffner
Am 19.01.2011 um 00:09 schrieb Watts Martin: I'm working on a little AppleScript that replicates a trivial but cherished feature of another editor -- being able to press Ctrl-Return (or whatever) and having it start the new line with an appropriate indent. My script does the right thing

Applescript equivalent of Ctrl-O (open line)

2011-01-18 Thread Watts Martin
I'm working on a little AppleScript that replicates a trivial but cherished feature of another editor -- being able to press Ctrl-Return (or whatever) and having it start the new line with an appropriate indent. My script does the right thing now as long as there's nothing on the line below where

Re: Applescript equivalent of Ctrl-O (open line)

2011-01-18 Thread Kendall Conrad
System events are certainly the easier (shorter) way to do it: --- tell application BBEdit to tell front window activate tell application System Events to keystroke end tell application System Events to keystroke return tell application System Events to keystroke

Applescript equivalent of Ctrl-O (open line)

2011-01-18 Thread Watts Martin
I'm working on a little AppleScript that replicates a trivial but cherished feature of another editor -- being able to press Ctrl-Return (or whatever) and having it start the new line with an appropriate indent. My script does the right thing now as long as there's nothing on the line below where