I dislike the fact that when I print from the AS Editor, the text size is so big. There's not an option to format the printed output in a different text size than what is used in the Editor.
So, I'm trying to write a script that grabs the contents of the Editor's front window using a copy command to preserve the formatting of the Editor and pasting it into a Tex-Edit Plus document where I can decrease the font size. I created this script and saved it as an application.
When I open a script and have it in the front window, then run the app from the script menu pulldown, I get the current contents of the clipboard.
### Use cut & paste to keep color formatting
tell application "AppleScript Editor"
tell document 1
set WindowName to name
tell application "System Events"
tell process "AppleScript Editor"
click menu item "Select All" of menu 1 of menu bar item "Edit" of menu bar 1
click menu item "Copy" of menu 1 of menu bar item "Edit" of menu bar 1
end tell
end tell
end tell
end tell
tell application "Tex-Edit Plus"
make new document with properties {name:WindowName}
activate
tell front window
tell application "System Events" to tell process "Tex-Edit Plus"
click menu item "Paste" of menu 1 of menu bar item "Edit" of menu bar 1
end tell
select text of front window
set size of selection to 8
select insertion point before character 1
end tell
end tell
Any clues as to why I can't get the text from the Editor?
TIA,
Jim