Modi34 Posted May 21, 2016 Share Posted May 21, 2016 Hello, I use a simple jxa for getting url from devonthink this is the code Im using function run(argv) { var q=argv[0].split('/'),q=q[q.length-1].split('.')[0]; var qq=Application('/Applications/DEVONthink Pro.app').getRecordWithUuid(q).url(); return qq } But it adds %0A in the end of every link - this is not a script bug - this is an alfred 3 bug osx 10.11.5, alfred v 3.0 [652] Link to comment Share on other sites More sharing options...
FroZen_X Posted May 21, 2016 Share Posted May 21, 2016 %0A is a return character, probably produced by your script. I had the same. To fix this you can use the new "Transform" function of Alfred to trim whitespaces. That will get rid of it. Btw what appswitcher are you using there? The circle you use to get back to alfred. Modi34 1 Link to comment Share on other sites More sharing options...
Modi34 Posted May 21, 2016 Author Share Posted May 21, 2016 (edited) %0A is a return character, probably produced by your script. I had the same. To fix this you can use the new "Transform" function of Alfred to trim whitespaces. That will get rid of it. Btw what appswitcher are you using there? The circle you use to get back to alfred. thx ! - that helped me) my app switcher is https://itunes.apple.com/ru/app/ring-menu-shortcut-to-your/id934212116?mt=12&ign-mpt=uo%3D4 - ring menu - http://ring-menu.com/ Edited May 21, 2016 by Modi34 FroZen_X 1 Link to comment Share on other sites More sharing options...
Modi34 Posted May 21, 2016 Author Share Posted May 21, 2016 (edited) I checked the script - this is an alfred bug - here is an example I added a string http://tryhaskell.org/into return statement and alfred added a line feed Edited May 21, 2016 by Modi34 Link to comment Share on other sites More sharing options...
FroZen_X Posted May 21, 2016 Share Posted May 21, 2016 (edited) I checked the script - this is an alfred bug - here is an example I added a string http://tryhaskell.org/into return statement and alfred added a line feed Something that Andrew shoulda take a look at then. For now you can add under Right Click → Utilities → Transform and trim whitespaces Now i gotta have to check out ring menu Edited May 21, 2016 by FroZen_X Link to comment Share on other sites More sharing options...
FroZen_X Posted May 21, 2016 Share Posted May 21, 2016 I checked the script - this is an alfred bug - here is an example I added a string http://tryhaskell.org/into return statement and alfred added a line feed Btw what did you use to make your gifs? Link to comment Share on other sites More sharing options...
Modi34 Posted May 21, 2016 Author Share Posted May 21, 2016 Btw what did you use to make your gifs? http://www.cockos.com/licecap/ FroZen_X 1 Link to comment Share on other sites More sharing options...
Andrew Posted May 22, 2016 Share Posted May 22, 2016 I checked the script - this is an alfred bug - here is an example This is a quirk of osascript which adds a newline to any output. Alfred actually runs all scripts in the same way, so a simple way to see what is being output from a script is to wire a keyword -> run script -> debug utility. Set the keyword to require arguments and show Alfred's debug panel. You can then change the script type (and get Alfred's default template) to see each output from the scripts. All of the script types don't add a new line except osascript. You'll also notice that in bash / zsh, the default script adds -n to the output to prevent the newline being added. One option would be for me to always trim outputs from the script output, but this would inevitably cause regression issues as some workflows may expect a newline being output. Cheers, Andrew Modi34 1 Link to comment Share on other sites More sharing options...
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