Hi List,
I've scripted this little thing to help blind users quickly copy and paste paragraphs from any application into text edit without switching all the time, which is a big time saver.
I've added a last snippet of code to allow system events to make operations to the right application:
set _app to name of (info for (path to frontmost application)) set AppleScript's text item delimiters to "." set _app to word 1 of _app tell application "System Events" tell process _app keystroke "c" using {control down, option down, shift down} end tell end tell delay 1 set thetext to get the clipboard tell application "TextEdit" set theindex to every paragraph of front document set thecount to count theindex set thecount to thecount + 1 set paragraph thecount of front document to thetext
say "pasted to text editor" end tell
The problem i have with the above is that the running script becomes the front most application each time.
I'm not sure how the visible true false argument works, but would that be the right way to go?
Or is there a better alternative to getting the application foremost, then truncating it with astids? IOW, is there a way to know the index of applications layers?
Best regards
Yuma
|