Argus Posted July 19, 2020 Share Posted July 19, 2020 (edited) Hello. I'm a newb to AppleScript and am trying to make a workflow to open a new TextEdit window, similar to this one made for Chrome: https://github.com/caiogondim/alfred-chrome-window-workflow . Here is my current script: on alfred_script(q) tell application "TextEdit" make new window tell application "System Events" to set frontmost of process "TextEdit" to true activate end tell end alfred_script Here's the workflow: Calling it in Alfred with "tw" results in no behavior. Could someone please help me out? Edited July 20, 2020 by vitor Solved by deanishe Link to comment
deanishe Posted July 19, 2020 Share Posted July 19, 2020 Your script is wrong/not compatible with Run Script. on alfred_script(q) is only for Run NSAppleScript (which you shouldn’t use). For a regular Run Script action, just use: tell application "TextEdit" make new document activate end tell Argus 1 Link to comment
Argus Posted July 20, 2020 Author Share Posted July 20, 2020 Exactly what I was looking for. Thank you very much! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now