Subject22 Posted April 12, 2013 Share Posted April 12, 2013 (edited) Things have probably run as far as they're going to in this thread, so I thought I'd post it as a bug report. Here's a quick summary: An AppleScript I wrote does not behave as expected when run from Alfred's Run Script action. The same script runs as expected from AppleScript Editor. The script runs as expected via Alfred's NSApplescript action once it has been cached in memory (i.e.: the initial run with caching fails, but all subsequent runs behave as expected, until Alfred is restarted). Saving the script to the workflow's directory and calling it with a bash script via Alfred's Run Script action seems to be the best workaround. See the linked thread for more details and examples. Edited April 16, 2013 by Subject22 Link to comment Share on other sites More sharing options...
Andrew Posted April 12, 2013 Share Posted April 12, 2013 Things have probably run as far as they're going to in this thread, so I thought I'd post it as a bug report. Here's a quick summary: An AppleScript I wrote does not behave as expected when run from Alfred's Run Script action. The same script runs as expected from AppleScript Editor. The script runs as expected via Alfred's NSApplescript action once it has been cached in memory (i.e.: the initial run with caching fails, but all subsequent runs behave as expected, until Alfred is restarted). Saving the script to the workflow's directory and calling it with a bash script via Alfred's Run Script action seems to be the best workaround. See the linked thread for more details and examples. This is unlikely a bug in Alfred, more an unavoidable behaviour thing. Would you mind not raising things like this as a bug until the investigation has been fully exhausted (i.e. the linked thread). Moving this to Closed for now pending the outcome of the other thread. Link to comment Share on other sites More sharing options...
Subject22 Posted April 12, 2013 Author Share Posted April 12, 2013 Sure. Sorry, I thought that's what I'd done, given that things seemed to have gone quiet in that thread :-) In future you'd rather I wait a bit longer? Ugh, maybe it's a good thing this is being closed. I just noticed that spelling mistake in the title. It'll bug me every time I look at it now Link to comment Share on other sites More sharing options...
Andrew Posted April 12, 2013 Share Posted April 12, 2013 Sure. Sorry, I thought that's what I'd done, given that things seemed to have gone quiet in that thread :-) In future you'd rather I wait a bit longer? Ugh, maybe it's a good thing this is being closed. I just noticed that spelling mistake in the title. It'll bug me every time I look at it now I'm trying to keep the bugs sub-forum as focused as possible as every bug raised in there can take me quite some time to investigate (which cuts time for Alfred general development). I don't believe this is a bug in Alfred as he simply passes your AppleScript to NSAppleScript or osascript without doing anything to it. If this particular script isn't working (where all others are), then you may just have to find a workaround as there isn't anything which can be fixed in Alfred. Link to comment Share on other sites More sharing options...
Subject22 Posted April 12, 2013 Author Share Posted April 12, 2013 That sounds perfectly reasonable to me. It was an honest mistake on my part :-) I've got a workaround, fortunately (thanks to Carlos-Sz), I just thought it was peculiar that it worked once the script was cached, and if it was called from outside Aflred (which I suppose includes the case where it is cached). Thanks for looking into this anyway! Link to comment Share on other sites More sharing options...
Andrew Posted April 12, 2013 Share Posted April 12, 2013 That sounds perfectly reasonable to me. It was an honest mistake on my part :-) I've got a workaround, fortunately (thanks to Carlos-Sz), I just thought it was peculiar that it worked once the script was cached, and if it was called from outside Aflred (which I suppose includes the case where it is cached). Thanks for looking into this anyway! No worries, glad you have it working Subject22 1 Link to comment Share on other sites More sharing options...
vitor Posted April 16, 2013 Share Posted April 16, 2013 Ugh, maybe it's a good thing this is being closed. I just noticed that spelling mistake in the title. It'll bug me every time I look at it now That made me laugh. If you go to your top post, pick Edit, and then Use Full Editor, you can correct the title. Link to comment Share on other sites More sharing options...
Subject22 Posted April 16, 2013 Author Share Posted April 16, 2013 I tried :-/ Seems I'm no longer able to change it. Link to comment Share on other sites More sharing options...
vitor Posted April 16, 2013 Share Posted April 16, 2013 I tried :-/ Seems I'm no longer able to change it. I’d say it’s because the thread is closed, but for that to be the case we shouldn’t be able to post replies, either. Maybe it’s just how the forum’s software works. Link to comment Share on other sites More sharing options...
Subject22 Posted April 16, 2013 Author Share Posted April 16, 2013 (edited) I suspect it has something to do with the thread being moved to this sub-forum. EDIT: Wait!! I lie! I can change it from the mobile site! I swear I wasn't able to do that from the desktop version. But perhaps I just missed it at the time :-) Edited April 16, 2013 by Subject22 Link to comment Share on other sites More sharing options...
vitor Posted April 16, 2013 Share Posted April 16, 2013 (edited) Either way, it’s done. Now it’d be funny to see people coming to this thread and thinking “wait, what mistake, what was the mistake?”. Edited April 16, 2013 by Vítor 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