Carlos-Sz Posted April 7, 2013 Share Posted April 7, 2013 (edited) Maybe it can’t be labeled as an Alfred bug but it seems an important feature is missing to properly work with Apple scripts. Steps: 1. Download the Test Workflow2. Double click Script Filter (the Language is /usr/bin/osascript)3. Escaping: there is Double Quotes but not a Backslash to check. Backslash also has a special meaning within an Apple script and it needs to be escaped. Test: 1. bring Alfred2. type the workflow keyword zz3. typing a single backslash will freeze the workflow or the default Alfred search will take place If you uncheck Double Quotes in Script Filter Escaping settings the same will happen. This also happens if I use the language /bin/bash and the command osascript to run an Apple script. Edited April 7, 2013 by Carlos-Sz Link to comment Share on other sites More sharing options...
Andrew Posted April 9, 2013 Share Posted April 9, 2013 I'll add in escaping for \ for the next release Link to comment Share on other sites More sharing options...
Carlos-Sz Posted April 9, 2013 Author Share Posted April 9, 2013 I'll add in escaping for \ for the next release Thank you Andrew. Link to comment Share on other sites More sharing options...
Vero Posted April 16, 2013 Share Posted April 16, 2013 Maybe it can’t be labeled as an Alfred bug but it seems an important feature is missing to properly work with Apple scripts. Steps: 1. Download the Test Workflow 2. Double click Script Filter (the Language is /usr/bin/osascript) 3. Escaping: there is Double Quotes but not a Backslash to check. Backslash also has a special meaning within an Apple script and it needs to be escaped. Test: 1. bring Alfred 2. type the workflow keyword zz 3. typing a single backslash will freeze the workflow or the default Alfred search will take place If you uncheck Double Quotes in Script Filter Escaping settings the same will happen. This also happens if I use the language /bin/bash and the command osascript to run an Apple script. Alfred 2.0.3 b184 is now in pre-release from the in-app auto-updater, including an improvement for this, so please update to test Link to comment Share on other sites More sharing options...
Carlos-Sz Posted April 16, 2013 Author Share Posted April 16, 2013 Alfred 2.0.3 b184 is now in pre-release from the in-app auto-updater, including an improvement for this, so please update to test I made some tests and now Language “/usr/bin/osascript” works as expected! Thank you! Link to comment Share on other sites More sharing options...
Carlos-Sz Posted April 18, 2013 Author Share Posted April 18, 2013 Alfred 2.0.3 b184 is now in pre-release from the in-app auto-updater, including an improvement for this, so please update to test I’m not sure if b184 did the same but typing double quotes will break the script even if the language is “/usr/bin/osascript”. You can reproduce the double quote not escaping issue in the test workflow I posted initially. Backslash is working fine. Link to comment Share on other sites More sharing options...
Andrew Posted April 18, 2013 Share Posted April 18, 2013 I’m not sure if b184 did the same but typing double quotes will break the script even if the language is “/usr/bin/osascript”. You can reproduce the double quote not escaping issue in the test workflow I posted initially. Backslash is working fine. Ah D'oh! I can totally see why this is happening! I need to escape backslashes in the string before escaping anything else otherwise all the other escaping gets escaped. I'll fix this in the next hour or so... thanks for spotting! Link to comment Share on other sites More sharing options...
Andrew Posted April 18, 2013 Share Posted April 18, 2013 I’m not sure if b184 did the same but typing double quotes will break the script even if the language is “/usr/bin/osascript”. You can reproduce the double quote not escaping issue in the test workflow I posted initially. Backslash is working fine. Update to pre-release b187 and that should now be fixed Link to comment Share on other sites More sharing options...
Carlos-Sz Posted April 18, 2013 Author Share Posted April 18, 2013 Ah D'oh! I can totally see why this is happening! I need to escape backslashes in the string before escaping anything else otherwise all the other escaping gets escaped. I'll fix this in the next hour or so... thanks for spotting! Great! It’s working now (b187). That was fast! Thank you. Link to comment Share on other sites More sharing options...
Carlos-Sz Posted April 18, 2013 Author Share Posted April 18, 2013 Update to pre-release b187 and that should now be fixed Everything is working!! Thank you again. Link to comment Share on other sites More sharing options...
Andrew Posted April 18, 2013 Share Posted April 18, 2013 Everything is working!! Thank you again. Great! Thanks for finding and testing this for me 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