How Can I Tell TextEdit Window To Scroll Down?

Hello,

New guy here. I searched but didn’t find.

I am using TextEdit to log files as they are copied. That works fine and provides visual feedback, but once the list outgrows the window I can only see the scroll handle growing shorter. I can no longer see the new items being added to the bottom of the text. I thought of reversing the order of the entries so that the newest items always push the older ones down and then reversing the list at the end, but I’d really rather make newest the entries last and scroll the window down to the bottom after each entry.

Couldn’t find anything about scrolling in AppleScript Language Guide, AppleScirpt Finder Guide or the TextEdit library.

I’m using Script Editor, don’t know how to use AppleScript Studio.

Can you help, or point me to an article?

Thanks!
icta

Hi,

try this, it scrolls one page down with GUI scripting


activate application "TextEdit"
tell application "System Events" to tell process "TextEdit" to key code 121 using option down

If you save the files with a .log extension, you can open them up in Console, which Auto scrolls

Thank you Mark and Stephan,

Both answers are good to know, but since I need to keep the original file extensions, Stephan’s looks like what I want.

icta :slight_smile:

error!

If my reply had been a script, it would not have run:

Sorry, Stefan, for misspelling your name. :frowning:

icta

For GUI scripting you must “Enable access for assistive devices” in System Preferences > Universal Access