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
Applescripts and Process text... 3rd pane gone #144
Comments
It may have been fixed in the latest commit. Can you please tell me the exact steps / commands you are inputting into QS and what is/isn't working so I can see if the latest version works. |
Hi, Thanks for replying pjrobertson! I am using QS B58 (3841) I haven't had a look at the latest commit yet, but I shall try and outline the problem hopefully a bit clearer here. My problem is with the QS, process text action for apple scripts. It allows QS to send text to apple scripts for them to do some desired action, sort of similar to the calendar event action that can process entered text. These are the steps I used to be able to do: Method 1 Alternative steps Method 2: Below is a twitter apple script that uses process text, give it a go and you might see that the process text pane doesn't allow text entry in the third pane as in method 1 above. Process text does not appear at all in the second method. The script action below is not important it is only ment as an example that the process text pane no longer seems to work. using terms from application "Quicksilver" |
I've now tested this out, and can confirm it doesn't work as expected (thanks for the great/clear instructions) Coincidentally, another developer mentioned this bug at the Developer Groups today, so we are looking into it http://groups.google.com/group/quicksilver---development/browse_thread/thread/85ca4fbfd269c2b2 |
And here I was thinking QS development was dead in the water again. So thank you for looking into my post. I was almost dare I say, thinking of finally switching to Launchbar! Especially since the last time I visited the blacktree site a few months ago the QS page wasn't even there, now I see it has its own domain. :)) I am now thinking of putting together some plugins again. Maybe not have to rely on Applescripts for twitter! Github still seems quite on the QS front is most of the action in the Google group or the new QSApp site? Vive la QS! |
It's certainly not dead! Launchbar - bah! Hopefully Rob is looking into this bug, and will be able to update us soon. It's most likely a bad commit that happened a while back, so if we can revert it we'll get the functionality back :) One things (other than bug squashing) we've been working hard on is documentation. If you have any ideas about plugins then post in the Dev groups (Google Groups are for support). We've actually just started a post on making a Twitter plugin as well (you weren't the original developer were you?) |
Yes, I’m looking into it. I’d like a fix to be in B59, but I don’t want to hold it up if that’s all we’re waiting on. FYI, I’m starting by looking at this commit and this one. Still trying to figure out what they did and if its relevant. |
Cheers Rob! I agree go ahead with B59, it is a very obscure action for most people. It is a good one though. |
Still working on this. Debugging shows that validIndirectObjectsForAction: is never being called. From that I see that AppleScriptProcessTextAction has no indirectTypes defined, but
So I’m not sure what to check from here. There must be something else that triggers the third pane besides property list settings for the action. Any theories? |
OK, fixed it, but now I have to figure out why to make sure it doesn’t break anything else. This line always returns 1. Turns out if it returns 2 instead, you get a third pane. |
Interesting, I'm not sure as to why this was '1' in the first place. I'd be happy to do some testing if you get a pull request out :) ... Looking quicksilver at commits: Also, this looks a bit funny (in commit f7d3fe1 L:209/216)
-- just the placement of the closing bracket before the ? On 13 April 2011 06:19, skurfer <
|
That first commit you link to: I wondered about that too, but when I looked at it again this afternoon, I noticed that Etienne was adding it and hard-coding it to return 1. It didn’t exist at all before that commit. He later came in and added a ton of logic, but I’m not sure why (yet). It still always returns 1 because the scriptPath is always nil, at least when a script in your Actions folder is in the first pane. Not sure about the last one. Maybe it throws a syntax error with the parentheses. So for pull requests, I can’t figure out how to limit them to certain commits. I see the thing to adjust the range, but I can’t figure out how to do what I think I want to do. :) Anyway, I’d like to split up my pull requests, but if I can’t, will you accept one that has the new proxy, the new menu bar, and this fix? |
Looks good. I'm not to sure about the original poster's 'second method': Alternative steps Method 2: I can't get an AppleScript in the 2nd pane - is this even possible? |
Sorry for the open,close have to be careful on the iPad where your finger fAlls. I will upload a picture of a script in the second pane when I am back at my desktop, i can confirm that it is possible though. I think unless it shows up in the actions catalogue you cannot use it in the second pane, I will confirm this also. It might also need the process text command in the AppleScript. |
Cool, that'd be good. I've just done a bit of googling. Unfortunately http://docs.blacktree.com/quicksilver/creations/scripts is down, although I did find this: http://osdir.com/ml/macosx.quicksilver.user/2008-09/msg00332.html I see what you have to do to get AppleScripts as Actions - just place them in the Actions folder in the QS support folder. Was it definitely in a previous version, I'd have thought this was always the way it was, especially since the link above says: There is no way to write an Applescript action that uses the third which means to me that the 3rd pane has never appeared for other people... |
Hey, wouldn't you be able to make Triggers for Applescript actions if Process Text works? ⇧⌃T for SuperTweet.scpt>Process Text>[text] - for example. That'd be pretty neat. Lots of other possibilities I reckon. |
Tested the AppleScript/Trigger combo and it works with Rob McBroom's fix :) On 13 April 2011 21:11, philostein <
|
Regarding “method 2”… You can’t get just any old AppleScript in the second pane, but you can get the ones in your Actions folder because they become actions. ;) Using this alternate method never broke. (I tested it before digging into this.) There isn’t supposed to be a third pane in this case. You just enter text in the first pane, then run the action on it (which passes it to the script). Regarding the post on OSDir…
This is true if treating it like an action (in the second pane), but if you call it up in the first pane, the
Quicksilver somehow knows it can take text and will make “Process Text…” the default. Otherwise, the default action for AppleScripts will be “Run”. Regarding triggers… Yes, you can use this in a trigger and I do several times a day. I have to track my time at work. I have a script that takes text and logs it to a file. So I made a trigger for Time Log ⇥ Process Text… ⇥ [blank]. When I invoke the trigger, I get a text input field. I type and hit return and I’m done. This could work equally well for Twitter and, like you said, a lot of other things. Did I overlook anything? :) |
Hey, I wonder if this is why Etienne was messing with the argumentCount. If a script in Actions could somehow specify an argument count of 2, it would cause the third pane to show. I think that’s it since his commit message read “Allow action to configure their argument count”. |
You covered everything nicely Rob. I may have been delusional but I am almost certain there was a time when process text did appear in the third pane. I have done a little testing and and have found the reason "method 2" was not working for me and I assumed since the process text was not appearing that nothing was happening. It was a network issue unrelated to QS, so as Rob says above it was not broken but process text doesn't appear any more in that case. The third pane should appear automatically for "method 1" after the process text action appears so that text can be entered. That seems to be working again, can we call this one closed? |
I just tried to create a SuperTweet.scpt>Process Text>[text] trigger, and the prefs trigger creation interface wouldn't allow me to tab to the third pane. I saved the trigger, but the shortcut didn't do anything. |
That's what this bug fixes. If you're on the bleeding edge, this would be On 13 April 2011 23:46, philostein <
|
Patrick is right. If you’re using B58, you won’t be able to create the trigger. And if you have a working trigger (as I did from B54), it won’t do anything because it requires a non-existent third pane. Anyway, yes, I believe this is fixed. I felt like the fix was a bit hacky, but now that I think I understand what Etienne was up to, I feel better about how I went about it. |
Hence the importance of comments ;) I think we need a discussion about those things... It's a hang up for me On 13 April 2011 23:58, skurfer <
|
[bug] Sorry guys, this still doesn't work for me in ß59 (10.6.7). Process Text… in pane 2 refuses to go to pane 3, with any valid custom text Action selected in pane 1. |
@skurfer made the initial fix, so he'll probably have the best idea of On 29 April 2011 19:45, philostein <
|
So what’s in the first pane exactly? You can’t select an action there, so I’m not sure what you mean. |
In pane 1, you can select custom AppleScript Actions from the ~/Library/Application Support/Quicksilver/Actions folder that take text using the 'on process text' code. Aren't they the scripts 'Process Text…' should provide a third pane for? Example Command: SuperTweet.scpt>Process Text…>[text] Shouldn't the third pane appear in text mode to allow text entry? I thought it was the compliment to: [text]>SuperTweet.scpt
|
OK I see, but I’m pretty sure the contents of Anyway, yes it should work as you describe if one of these scripts appears in the first pane. Can you post the script it’s not working with? |
My Actions folder is in the Catalog, so I can call the scripts there into pane 1. Digression: wouldn't navigating to the folder to get a script into pane 1 have the same outcome, even if the script wasn't in the Catalog? Here's an example Action script called 'Text test':
It works as this command: [text]>Text test.scpt but not: Text test.scpt>Process Text…>[text] Topical tenuous connection: Could it have something to do with argument count? Colin got a count of 2 to produce the third pane with some scripts. |
Yes, you’re right. I just tried it and I got the third pane as expected.
I copied the script exactly as you have it and saved it to
The argument count is what triggers the third pane, yes. However, if the action in the second pane is “Process Text…”, the argument count is hard-coded to 2 (this was how I fixed it originally). The argument count returned by the script should be ignored. |
I'm glad it's working for someone, but it still doesn't work for me. I put the same script in ~/Library/Scripts/ (which is definitely in my Catalog) and tried it from there. Still nothing, even with Process Text… dragged to the top of the Actions list so it appears first. I saved the code I gave you directly to ~/Library/Scripts/ and tried that, but no luck. No third pane. I recently re-installed ß59 after trying a github build. |
If you’re able to build from source, you could try the poor-man’s debugger and just add a few lines like this here and there in
You might also want to log the value for actionId. |
I'll give it a go, thanks. |
I put some NSLog(@"argument count %@", argumentCount); lines in QSAppleScriptActions.m. When running a 10.5 compiled QS, I don't see any NSLog messages in the Console or in XCode's debugger window. When making the [action]>Process Text… (still no pane 3) Command, I only get a response from the Console when pressing enter: 30/04/2011 13:42:53 Quicksilver[7051] Unhandled AE conversion from descriptor (null) I have yet to see any NSLog messages. Need to activate something? |
Get this a lot in the Debugger Console: 2011-04-30 14:07:46.001 Quicksilver[7201:80f] Incorrect NSStringEncoding value 0x0000 detected. Assuming NSStringEncodingASCII. Will stop this compatiblity mapping behavior in the near future. |
That's unrelated. Make sure you've clicked 'Build -> Clean All' in XCode, On 30 April 2011 15:08, philostein <
|
No dice. Clean All Targets then Build and Run. No NSLogs in Debugger window and Console. Here's my project info. Base SDK is 10.5, Project Format 3.1-Compatible http://dl.dropbox.com/u/157506/QS%20XCode%20project%20info.png |
That all looks fine. You just need to make sure the NSLog is in the right Try using the 'Debug' version. Or one of us could build it for you If you click the line number Rob suggested, a little blue arrow will appear On 30 April 2011 15:54, philostein <
|
If you don’t want to hit this breakpoint 3 times for every script in your catalog when the app starts, you can turn them off and hit Build and Run, then after the app is loaded, turn on the breakpoints and do your test. It sounds to me like that method never gets called. I wonder if it’s a 10.5 thing, but I don’t have a 10.5 machine to test. |
I did a quick recording to show how you can watch the value of http://dl.dropbox.com/u/2214419/Quicksilver/debugger.mov Though if |
Thanks Rob, most helpful. I could see this turning into a back and forth of epic proportions… I copied your workflow as best I could: http://dl.dropbox.com/u/157506/Phil's%20Debugger.mov Line 232 doesn't get highlighted when Process Text… is called, and there's nothing in the last Debugger window. I'm probably doing something wrong - on first build and run, QS usually hangs and I have to do it again, and my Trigger shortcuts also show up as unknown. Re-installing ß59 fixes that. I'll search the project for argumentCountForAction: and see if I can get a breakpoint to er… break. Cheers! |
I searched for argumentCountForAction: and found it in: QSActionProvider.m, QSAction.m, QSAppleScriptActions.m I set breakpoints on them, and after Build and Debugging QS and typing towards a script Action, the first break was in QSAction.m - I then stepped over a few times. |
There seem to be two Do what you did before, but when you get to line 194 in QSAction.m, do a “step into” instead of “step over”. It’ll go into |
I did that, and got this highlighted:
It's in QSActionProvider.m Here's a shot: http://dl.dropbox.com/u/157506/Step%20in%20line%20194.tiff Guess: returning an argument count of 1 instead of 2? |
OK, so you’re being taken to a completely different method to get the argument count, which I assume is based on the value of Once |
QSActiom.m 193 doesn't seem to have a submenu for provider in the variable column. http://dl.dropbox.com/u/157506/QSAction%20m%20193.tiff No QSActionProvider or NSObject submenus. |
...just throwing it out there - it might be an idea to jump on iChat and use On 2 May 2011 13:27, philostein <
|
I told you it'd get epic… ;) Whatever's easier for you guys. |
That had crossed my mind. I’ll send a DM to LoveQuicksilver with my IM info. |
Patrick, you’ll be happy to know that it was all your fault. Well, it makes me feel better anyway. :) I couldn’t quite explain what I was seeing in the debugger, but I remembered something I thought of yesterday. This is handled by the Core Support plug-in. Has anything atypical happened with that plug-in in the last few months? ;) So maybe we should say something on the users’ list about removing it from |
Cheers Rob! So Core Support shouldn't be in the Plugins folder? |
Yay! Sorry for breaking things guys. :( The Core Support plugin should ONLY live in the Quicksilver.app bundle. I think I removed it from the Plugins repo a while back, because I realised Maybe it should be in the check on start for a list of 'known bad plugins' Sorry again for breaking things (I don't want to be another Etienne! :P) On 3 May 2011 13:49, philostein <
|
I used to be able to use applescripts with quicksilver and the process text operation but it hasn't been working for a while now for me. The Process Text command is still in the actions list and shows up when the applescript is in the first pane, but that is useless without being able to enter some text using period text entry. It should only show up as a third pane but it doesn't seem to recognise the scripts when they are in the second pane.
It seems to be a process text problem as many other actions still use the third pane such as "email to", and "move to" etc.
All the scripts I use worked a while ago (previous QS builds) and contain the quicksilver terms e.g.
I have done a bit of searching for a solution and this seems to have been a problem in previous builds but was supposed to be fixed. Is anyone else have this problem with snow leopard and B58 (3841)?
The text was updated successfully, but these errors were encountered: