Acidham Posted March 5, 2017 Share Posted March 5, 2017 I am not sure if I miss something but when I set a variable after an applescript returns a value the var always contains a newline (\n). I created a test workflow which shows the newline issue: https://db.tt/XmeYCGT5oL Any idea why Alfred adds the \n to the end of the value? Link to comment
vitor Posted March 6, 2017 Share Posted March 6, 2017 It’s not Alfred adding the newline, it’s the return statement. If you do an echo in bash, for example, you’ll get the same result (unless you do it with echo -n). For the specific use case of that example workflow, you can use a Utilities → Transform → Trim Whitespace between the Run Script and the Args and Vars. Link to comment
Acidham Posted March 6, 2017 Author Share Posted March 6, 2017 Thx Vitor! I was playing with Transform Utility but I always tried newline ٩(͡๏̯͡๏)۶ With Trim Whitespace it works. 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