samispade Posted March 29, 2013 Posted March 29, 2013 Hi, I have a simple test workflow consisting of a Keyword box which triggers a /bin/bash Run Script box. The script inside the box is 1 line:- echo "some text" Feeding this into a Post Notification box works as expected, but when I feed it into a /usr/bin/osascript Run Script box which contains the following:- set temp to "{query}" set the clipboard to temp nothing gets written to the clipboard. Changing 'set the clipboard to "more text"' doesn't work either until I delete the first line 'set temp to "{query}"'. Is it a bug?
bencfd Posted March 29, 2013 Posted March 29, 2013 Hi, Using exactly the same code, it works for me, the query goes to the clipboard. Isn't your keyword used in another workflow? And does it require an argument?
samispade Posted March 30, 2013 Author Posted March 30, 2013 (edited) No, the keyword is unique as far as I know and no argument is required. It's so simple that it's got to be either something wrong with my Mac or a funny in Alfred. Just tried changing the osascript box to a /bin/bash box and that doesn't work either! Edited March 30, 2013 by samispade
jdfwarrior Posted March 30, 2013 Posted March 30, 2013 No, the keyword is unique as far as I know and no argument is required. It's so simple that it's got to be either something wrong with my Mac or a funny in Alfred. Just tried changing the osascript box to a /bin/bash box and that doesn't work either! Instead of setting the value to the clipboard in applescript, why not just use the Copy to Clipboard output module in the workflows area?
samispade Posted March 30, 2013 Author Posted March 30, 2013 (edited) I don't want to copy to the clipboard, I was just trying to debug something else I was doing and thought this would help me to see what was happening. I was trying to pass "{query}" to the rightmost script box and it wasn't doing anything. Deleting the line with "{query}" in and the rest of the script runs. Edited March 30, 2013 by samispade
jdfwarrior Posted March 30, 2013 Posted March 30, 2013 I don't want to copy to the clipboard, I was just trying to debug something else I was doing and thought this would help me to see what was happening. I was trying to pass "{query}" to the rightmost script box and it wasn't doing anything. Deleting the line with "{query}" in and the rest of the script runs. Gotcha. Ok for testing then, add a Keyword (input), Run Script (action), and a Large Type (output). Set the keyword, then in the Run Script item , set the language to /usr/bin/osascript and for the script... set temp to "{query}" return temp Connect the 3 modules. Mouse over the individual pieces and a little tab should show up on the right side, click that and drag to the next module. That will connect the modules to one another. That should show anything entered into that workflow in Large Type. That should show that it IS functioning and is able to pass the data between the different pieces
samispade Posted March 30, 2013 Author Posted March 30, 2013 Got it working now. Decided to look through all the preferences and clearing the application cache under Advanced fixed it. Thanks for your replies.
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