mweibel Posted March 15, 2013 Share Posted March 15, 2013 Hi, I added a *.scpt file to the workflow folder and want to call it from the "run script" action. How can I do this? I tried this: `/usr/bin/osascript runit.scpt` and also: `/usr/bin/osascript ./runit.scpt` But it doesn't seem to work. When I run the script from the applescript editor it works though. Link to comment
ClintonStrong Posted March 15, 2013 Share Posted March 15, 2013 Are you displaying any dialogs in your script? osascript doesn't allow user interaction (such as dialogs), however you can wrap them in a tell block to get it working correctly: tell application "System Events" activate display dialog "It worked!" end tell If that doesn't fix it, make sure you're using the correct language in the script action (should be bash or zsh). If it still isn't working, you can try running the command from the Terminal, and see what errors it might be outputting. Link to comment
mweibel Posted March 15, 2013 Author Share Posted March 15, 2013 Nevermind. After compiling in the Applescript editor, I didn't save the file again. Therefore osascript mentioned that it has uncompiled changes and can't be run like this. Therefore, both of the commands work. If you encounter similar problems, make sure you have compiled & saved the file. 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