Timeline for How can I execute AppleScript from Textedit?
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 26, 2019 at 13:28 | comment | added | user3439894 |
Take the code in the OP as an example. As is, run by your Service it fails as TextEdit would not have focus when System Events runs the keystrokes. Add a tell application "TextEdit" to activate after the set the clipboard ... and the Automator service just keeps running in the menu bar and never gets above 0% complete. Even just selecting tell application "TextEdit" to activate by itself hangs the Automator service.
|
|
Aug 26, 2019 at 13:15 | comment | added | CJK | @user3439894 Can you be more specific? | |
Aug 26, 2019 at 13:11 | comment | added | user3439894 | Sorry, I had to make an edit in order to retract my up-vote. The reason I did this is because while your answer works in some cases, it also fails in some cases. I can cause the Automator service hang with simple basic AppleScript code. Therefore, this is not a viable answer. | |
Aug 26, 2019 at 13:08 | history | edited | user3439894 | CC BY-SA 4.0 |
deleted 2 characters in body
|
Aug 26, 2019 at 12:10 | history | answered | CJK | CC BY-SA 4.0 |