-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong Sublime Text Path #9
Comments
When you say you've CHOSEN the incorrect path – did you see a dialog asking you where SublimeText was located? |
Ok, think I got it: In Alfred 2 Preferences, doubleclick the NS Applescript workflow item and uncheck the "cache compiled AppleScript" box. Run the workflow again. If this works and SublimeText is being used to open your documents, you might as well check the box again. |
@franzheidl yes, the dialog showed up but for a mistake I chose the iterm path instead of Sublime Text and I did not renamed the Sublime Text application. I've tried your suggestion but it didn't work. I even tried to remove the workflow script and re-import it but it still targets iterm instead of Sublime Text. I have no idea where the path variable is stored.. |
There's no such thing as a path variable that is being stored, every time the script is run it asks the System for the path to SublimeText. When you first run the workflow, for some odd reason* the script couldn't find SublimeText and displayed the dialog. Once you've made your choice in the dialog, AppleScript actually changes the name of the application inside the script to whatever you chose. Can you check/make sure that in the workflow's applescript module, the fifth line looks like this (highlighted): If it doesn't, change it so it does and save. If it does, I could only imagine that the wrong application name was being saved to the cached and compiled script, hence my previous suggestion. The cached and compiled scripts are taken care of by Alfred, not by the workflow itself. If the above didn't work and without any further investigation, the only quick fix for you would be to hardcode the path to SublimeText into the workflow script. Assuming your copy of Sublime resides in your Applications folder, change the line highlighted in the in the screenshot to:
If SublimeText is somewhere else on your disk, enter its actual path (HFS or POSIX should both work). Don't forget to save :) Let me know how you get along! (*)Are you sure you are using the correct version of this workflow against version of SublimeText (2 or 3?) you're using? That might have caused the trouble (and the dialog to appear) in the first place… If SublimeHQ would have been clever enough to keep naming their application consistent across versions, neither you nor I would have to go through all this :/ |
Thank you really much for your time! |
Glad it's working for you now! |
Hello, I've incorrectly chosen the SublimeText path (I chose iterm instead ) so now whenever I run the command "Open in Sublime Text" each file is opened in iterm. I've tried to reinstall the script but apparently the settings are kept because they are stored somewhere else.
Any hint?
This is a duplicate of this issue
The text was updated successfully, but these errors were encountered: