-
Notifications
You must be signed in to change notification settings - Fork 286
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
3-pane applescript actions that accept files #1023
Comments
This will be fixed when #1048 gets merged. Hopefully one of the next two releases of QS |
That looks nice, thank you very much. Any chance of implementing it as "on [open file/process text] dObj with [text/file] iObj"—i.e. allowing the action-writer to force the type of the 3rd pane as well? Ultimately it would be awesome if it were "on process <> dObject with <> iObject", such that you could specify "email", or "folder", or "URL", arbitrarily in either field. That, I'm sure, is a lot more work, and would best be implemented after cleaning up the Actions preferences to more clearly handle types, which I think I remember as being on the "sometime, maybe, when we're done putting out fires and adding easier features" list. I look forward to seeing what good stuff you come up with—in a relatively short time QS has already gone from "well, when it works it does a couple things that no other software does, so I'm stuck with it" to every bit as good as it ever was and faster to boot. |
The way it stands at the moment, you can use: on process text someText with someText/aFile and on open files aFile with someText/aFile so you can use text or a file in the iObj, you just need to use on open On 16 August 2012 23:26, daniels220 notifications@github.com wrote:
|
Yeah, sure, that's a 90% solution and it's fine for now. It'd be nice if (95%) I could say, this action needs a file, not text, in pane 3. Later I think one possible 99.9% solution is what I outlined above—a large, possibly extensible, list of types accessible to AppleScript, and a format something like "on process <> dObject with <> iObject". Not sure if AppleScript makes this easy—looking at the code, it's obviously not a totally simple conversion. Actually, another way to do it would be to have another function, "get argument types", that would return {dType,iType} (and automatically set argument count if it returns 2 things). Then the current APIs are fine. |
You're probably right, that would be the end goal. At the moment, the On 17 August 2012 00:45, daniels220 notifications@github.com wrote:
|
Actually I think I didn't. What I meant was, I want to be able to specify which —text, file, and later folder, URL, email, application, etc.—I want, and not the others. I want to be able to force Pane 3 into text mode, or disable it (force it to stay in file-search mode). I want to have the catalog-search performed there search only folders, only apps, contacts, bookmarks, whatever. At the moment any action I want to write, I probably can—but I have to do all sorts of type checking, if I want it to be safe. Also, the "and converts it to text" bit is kinda a problem, at least for anything more complicated than a file. And every line of AppleScript code is slower than the same thing in Objective-C, and it has to be duplicated between similar actions. I realize, though, that as I said—any action I want to write, I probably can, it's just a matter of telling people what will break it. So for now it's fine. Thanks again for all the great work. |
OK, I understand. Yes, that would be nice to get AppleScripts to have all On 17 August 2012 07:33, daniels220 notifications@github.com wrote:
|
Heh. OK, at a certain point, you just need to use Objective-C. ;-) This is all possible today. |
Hey, thanks for the link. I don't know Obj-C at the moment—it's on the list of "things I want to learn Someday Maybe"—but QS will be one of the first things I look at once I'm comfortable, if/when I do learn. |
AppleScript action improvements. Fixes #1023
So a while back I wrote #947, and holy crap is it too long. Sorry. I figured I'd try again with something more specific.
Is there any chance of an AppleScript actions API that allows a file to be selected in pane 1 for a 3-pane action? Right now, you can make a 3 pane action with
get argument count
/process text
(1st pane text, 3rd pane text or file-passed-as-path), but even thoughon open theFiles with iObject
compiles, QS throws an error in the console sayingPerform AppleScript Action Error: "NSAppleScriptErrorMessage" = "The iText parameter is missing for open.";
when you try to run that action.I would also like, if possible, the ability to specify what type of file I want, and whether I can accept text—basically the full range of restrictions that Obj-C actions can evidently place (like New Folder..., Move To..., etc).
The text was updated successfully, but these errors were encountered: