Alternative abbreviations trigger?

Alternative abbreviations trigger?

Postby roymccoy » Sat Oct 17, 2009 4:10 am

I want to get more and more into using QK abbreviations, but there seem to be continuing problems with when they can be triggered using the standard of procedure of typing the abbreviation followed by a user-defined end code, in my case a backslash. The ability to choose both the abbreviation and the end code both provide flexibility of course, but it doesn't avoid the essential problem of not being able to use a shortcut in any context, at least without frequently having to tailor its individual settings or create contextual variants.

It may be that I'm exaggerating the problem, so I'll keep trying, noting inconvenient cases and reporting them. But for the time being I'm wondering whether my old Classic Mac QK abbreviation method (never fully documented - I picked it up from QK expert Ray Robertson) might somehow be usable with the current version, or, failing that, whether it might be reenabled in a later one. Considering the latter possibility I'll post this in feature requests as well as in general discussion.

The old method used the QK message window, which had a text entry box with one of its options being to run the shortcut whose name was entered. (Another option was to put the entered text on the clipboard; if there were others, I don't remember them.) The method thus involved one more keystroke than the present one, the abbreviations trigger (that is, the trigger that brought up the play-by-name message window) followed by "the abbreviation" (actually the name of the shortcut, though preferably in abbreviated form, e.g. "oac" for "open ad catalog") and return to close the window and run the shortcut, rather than abbreviation followed by defined trigger key as at present. The additional keystroke is of course slightly unfortunate, but the method nonetheless has the great advantage of being able to be used in any context, without, for example, causing the deletion of something that shouldn't be deleted (like a graphic that's selected when the abbreviation is called), or causing an unwanted jump in a list in which something is selected.

I may have been overly optimistic regarding the chances of being able to use an alternative method with the present version. I was thinking that the typed/captured abbreviation could be used to run the shortcut, but on second thought it could presumably be used only as a QK abbreviation, in which case the same problems would presumably apply and the workaround would be useless. If a current problem-less alternative is available I hope someone will inform me of it, but I don't suppose this to be the case.

An advantage of the present system is that a full and transparent shortcut name can be used and not merely an abbreviation, as was previously necessary in order to be able to type the entire name quickly into the message text enter box - "h.o" or "ho" rather than "Hyphenation - On", for example. Ideally, the old "play by name" feature would be converted into a new "play by abbreviation" feature in a future QK version. The idea is simple enough: the problems caused by typing the first letter or letters of QK abbreviations, or by deletion when something is selected, could be avoided by buffering the abbreviation in an intermediate dialog of some sort. Anything appropriate would do, though I suspect there might not be anything better than a restored optional text entry box in the QK message window, with "play by abbreviation" aside or in place of the old "play by name" option.

Thanks,

Roy McCoy
Rotterdam, NL
roymccoy
 
Posts: 22
Joined: Fri Jan 18, 2008 9:22 pm
Location: Rotterdam, The Netherlands

Re: Alternative abbreviations trigger?

Postby gb2 » Mon Oct 19, 2009 8:44 am

thanks for the feedback - I've entered it into our feature request database.
User avatar
gb2
Site Admin
 
Posts: 2871
Joined: Mon Feb 06, 2006 5:22 pm

Re: Alternative abbreviations trigger?

Postby roymccoy » Fri Oct 23, 2009 6:18 am

You're welcome. Should I/Could I have received notification of your message via e-mail? I didn't, though "Notify me when a reply is posted" is checked now and I assume it was before as well. I came back to post this observed and highly normal situation:

I've formatted some text in InDesign and I want to create a new paragraph style with this formatting. I remember that I have a shortcut to do this and an "nps" (new paragraph style) abbreviation to trigger the shortcut. But I can't use it, as when I type the abbreviation it replaces the selected text. I can hit cmd-c to copy the text first and then cmd-v to paste it back afterwards, but this is two extra keycodes rather than the one of my suggestion - which, again, would be the keycode to call the message dialog whose text entry box would take an abbreviation to be played.

Thanks.
roymccoy
 
Posts: 22
Joined: Fri Jan 18, 2008 9:22 pm
Location: Rotterdam, The Netherlands

Re: Alternative abbreviations trigger?

Postby gb2 » Tue Oct 27, 2009 8:44 am

I believe you had posted the same thing in 2 different sections and 1 was deleted, perhaps you had the notification on the other one. I added your additional comments to our feature request database.
User avatar
gb2
Site Admin
 
Posts: 2871
Joined: Mon Feb 06, 2006 5:22 pm

Re: Alternative abbreviations trigger?

Postby roymccoy » Wed Dec 16, 2009 5:16 pm

Thanks. Unfortunately I didn't get your second reply either, so it seems something is definitely not working right with "Notify me when a reply is posted".

I came back to this owing to regret I was feeling about not using the abbreviations feature anyway near as much as I would like to. I have a file I'm opening frequently, and on my old Mac I would have made a play-by-name shortcut for this in a minute: "o.omb" (open "One More Beer" - a song lyric I've been working on). But I'm simply hesitant to do this in QuicKeys X4 - which means, I suppose, that I don't feel that abbreviations work as well as play-by-name in older versions.

Can you tell me if the idea I presented has been tentatively accepted, definitively rejected,...?

In any event, I've just now had a new idea. I think it's a good one, and I suspect it's implementable. In "Classic QK", as I'll call it, one of the Message text-entry options was "play shortcut", if I remember right. This meant that the shortcuts I triggered using this method had to have abbreviated names that could be conveniently and quickly typed into the Message text box. You could still have this in the QK X implementation. But what you could also have, I just now realized, would be not just "play shortcut" but also "play abbreviation". That way, the user could have a non-cryptic name to generally identify the shortcut, and the abbreviation could be picked up from the text-entry box as an alternative to the way it is now (which, again, I find risky and disconcerting enough that I'm pretty much not using them at all, whereas before I had hundreds of them and used them constantly).

Thanks.
roymccoy
 
Posts: 22
Joined: Fri Jan 18, 2008 9:22 pm
Location: Rotterdam, The Netherlands

Re: Alternative abbreviations trigger?

Postby gb2 » Thu Dec 17, 2009 10:20 am

don't know what to tell you on the Notify problem, you are the only one that has complained that it isn't working. Try it on some new post sometime.

Note: It is QuicKeys 4 - we have dropped the X

I've entered your new feature request. I can't say one way or the other on your previous feature request. I had already added the play abbreviation feature request.

I looked at the old manual and didn't see anything like that in the Message step, maybe you are referring to the GoSub step that played another shortcut. QuicKey for OS X has that its just called Insert Shortcut.
User avatar
gb2
Site Admin
 
Posts: 2871
Joined: Mon Feb 06, 2006 5:22 pm

Re: Alternative abbreviations trigger?

Postby roymccoy » Thu Dec 17, 2009 1:31 pm

I got the notification this time, so apparently it's kicked in.

I wouldn't be surprised if "QuicKeys 4" caused some confusion with the old QuicKeys 4, but you may have expected that and decided to put up with it.

Thanks for registering the new feature request.

The play-by-name feature was in fact documented (though I didn't notice it – it was brought to my attention by QuicKeys wizard Ray Robertson in Georgia), but just barely. See the version 3 QuicKeys Reference, page 31: "Text Entry Field This option allows the user to enter text into the dialog box. If you click this checkbox, select the destination of the text the user types. QuicKeys can put it on the Clipboard, type it with or without a final carriage return, or use it as the name of a shortcut and run it" [emphasis added]. That's what I want, but with it running an abbreviation rather than a full shortcut name (though, again, the full name could be made available as an additional option).

What I'm after is essentially an alternative way to enter abbreviations, the text-box way seeming preferable to me because you can see what you're doing/typing, and the abbreviation text is separated from what you're working on – so that nothing can be deleted, for example. Insert Shortcut doesn't give me this, and I actually don't understand what advantage it offers in any context. The User Guide says: "Insert shortcut allows you to insert existing shortcuts inside your multi-step shortcuts. This is useful for recycling shortcuts you’ve made, saving you the time of having to recreate them when you need them again as part of a larger multi-step shortcut. Imagine you have three shortcuts (A, B, and C) that you run every night, each consisting of 3-5 steps. At some point you decide to put them all into one big multi-step shortcut. Rather than copying and pasting all of the steps from each shortcut into the larger shortcut of twelve steps, You can create a new shortcut which consists of three Insert shortcut steps, each triggering your original shortcuts A, B, and C." But what this appears to ignore is that multi-step shortcuts can be dragged directly into shortcut editing windows without using Insert Shortcut. So Insert Shortcut doesn't seem to do anything but insert the superfluous step – one for each inserted shortcut – of creating an Insert Shortcut step before dragging the desired shortcut into it, rather than simply into the editing window without it. See what I mean?

I saw something about an improvement in the new version in regard to entering abbreviations, so I'll give it another try. I think I'll probably still prefer the idea of hitting a keycode to get the play-by-abbreviation text box (as with the earlier QuicKeys there would be only one shortcut for this, with the play-by-abbreviation option set for it), typing the abbreviation and then return. This would be, again, only one extra keystroke than with the abbreviations as they are now triggered, and it would, unlike in the current situation, be usable and problem-free in any context. Thanks.
roymccoy
 
Posts: 22
Joined: Fri Jan 18, 2008 9:22 pm
Location: Rotterdam, The Netherlands

Re: Alternative abbreviations trigger?

Postby gb2 » Fri Dec 18, 2009 12:21 pm

here is an AppleScript that will give you the old functionality of the Play shortcut by name:

Code: Select all
tell application "System Events"
set frontApp to displayed name of first process whose frontmost is true
if the frontApp ends with ".app" then
set the frontApp to (characters 1 thru -5 of the frontApp) as string
end if
end tell

set userCanceled to false
try
tell application frontApp
set dialogResult to display dialog ¬
"Type the shortcut to play" buttons {"Cancel", "Play"} default button "Play" cancel button "Cancel" default answer ""
end tell
on error number -128
set userCanceled to true
end try

if not userCanceled then
set playThis to text returned of dialogResult
tell application "QuicKeys"
play shortcut named playThis
end tell
if result is equal to false then
tell application frontApp
display dialog "Shortcut not found." buttons {"OK"} default button "OK"
end tell
end if
end if


It puts up a dialog and you type in the name of the shortcut to play.
User avatar
gb2
Site Admin
 
Posts: 2871
Joined: Mon Feb 06, 2006 5:22 pm

Re: Alternative abbreviations trigger?

Postby roymccoy » Fri Dec 18, 2009 1:25 pm

That's fantastic, many thanks!

It eliminates my own need for a change to QuicKeys itself to get this, but finding this so awesomely handy myself I'd think you'd want to document it for others (assuming it isn't documented already).

Also, I still think it would be a very good idea to make this work with abbreviations as well as shortcut names, even if only via this AppleScript route (which is not to suggest anything at all inadequate about this, at least for me as someone with AppleScript experience). I'm imagining a new command in the QuicKeys Suite, "play abbreviation". Or, of course, a new option under "play shortcut" itself: "[abbreviation text] : The abbreviation of the shortcut to play, quoted."

I'm not absolutely sure what I'm going to do now, since all my current shortcuts have relatively long names rather than the abbreviated kind I had before for playing by name. Right now I'm thinking that I may start by making copies of all my shortcuts for which I have abbreviations (there aren't that many, since - again - abbreviations haven't worked out for me; I tried again last night but it really didn't work, I keep getting beeps in contexts where I can't type one of them), name the copies with the abbreviations, delete all the abbreviations (to avoid messiness and confusion with new ones), and then take it from there. This is of course inelegant and awkward, as it means having two copies of every shortcut for which I have an abbreviation. So maybe I'll wind up deleting the long-name originals. Or maybe you'll whip out a quick beta version with "play abbreviation" or new "play shortcut" option, and I'll test it for ya!

Thanks again!
roymccoy
 
Posts: 22
Joined: Fri Jan 18, 2008 9:22 pm
Location: Rotterdam, The Netherlands

Re: Alternative abbreviations trigger?

Postby roymccoy » Sat Dec 19, 2009 8:39 am

I'm hesitating to undertake a systematic redoing of my shortcuts. I "only" have around 400 in contrast to the thousands I had before, but it could still get messy, take too much time, and perhaps wind up in something disagreeably chaotic.

One thing I want to do is ask for some feedback from Startly regarding technical feasibility. I notice in the QK scripting dictionary that the only two properties of a shortcut are name and ID, so that it's not surprising that the two play shortcut options are named and id. Might it perhaps be relatively simple to define a shortcut's (optional) abbreviation as a property, so that abbreviation could be used in addition to name and ID for scripted triggering?

If so, I want to repeat my earlier suggestion seriously, that a beta version incorporating this be produced (preferably as quickly as possible) and sent to me and perhaps other existing beta users for testing. I think this would be a dynamite feature for a future version of QuicKeys: "vastly enhanced abbreviations triggering". Admittedly I don't know how to get this on the PC side as well as the Mac side, and so it may not be altogether as feasible as I'm imagining. For cross-platform, I suppose it would be better to reinstate the old play by name feature generally, though again with abbreviation added alongside name as an option, so that users could have both verbose names and convenient triggering abbreviations.

I only have one "vote" here, and if everybody else is getting along famously with QK abbreviations in their current implementation, I wouldn't expect there to be significant interest in this proposal. But for me they just don't work (and believe me, I'd use them if I could - as demonstrated by my massive prior use of and dependence on play by name). Either something gets erased that shouldn't, or I have the annoyance of having to be too careful about avoiding such erasure, or I can't enter an abbreviation at all. The old, obscure, under documented way is simply better, extra keystroke or not.

Thanks again, hope to hear back something encouraging on this.
roymccoy
 
Posts: 22
Joined: Fri Jan 18, 2008 9:22 pm
Location: Rotterdam, The Netherlands

Re: Alternative abbreviations trigger?

Postby roymccoy » Sun Dec 20, 2009 6:21 am

In my post the other day I didn't remember and thus failed to mention the additional example of when triggering shortcuts via the current QK abbreviations implementation doesn't work, namely when lists are involved. I believe I was thinking primarily about Finder windows, but here's a good example from Apple Mail:

--picture not found--

I have an abbreviation - my only Mail abbreviation, actually - "t.il", TRANSFER to INDESIGN LASSO (mailbox), which I wanted to use today. Immediately when I typed "t", however, the selection jumped to a different message below, which not only made it impossible to transfer the desired message, but also marked the undesired one as read, so that I had to change it back to unread in order to continue reading the messages in their desired list order. There might also be the danger of deletion of the mis-selected message, only in this case I can type only three characters and then it starts beeping.

Since I'm now posting on this again, here's an excerpt from a message I just sent to Olav Kvern at Adobe:

> I have managed to make a number of very handy workaday scripts,
> triggered via QuicKeys though I could assign keycodes within InDesign itself.
> I just learned, by the way, that the old QK play-by-name feature, apparently
> lost with the advent of the OS X versions, can be restored by AppleScript:
> [gb2's script]
> Trouble is, I already have around 400 QK shortcuts (as opposed to the thousands
> I had pre-OS X) with names that are way too verbose for me to be able to take
< advantage of the script without (1) a lot of renaming work, and (2) losing the
> transparency of the verbose names. So what I'm hoping is that Startly will do
> something like defining abbreviation as a property of shortcut along with name
> and id, so that [abbreviation text] can be added as an additional play shortcut
> option. Lacking that, I'm provisionally toying with the somewhat absurd idea
> of naming my shortcuts with typeable play-by-name abbreviations, and...
> registering the verbose names as abbreviations!

Obviously and needless to say, it should be the other way around. Furthermore, if I did this and Startly later implemented play by abbreviation, I'd be faced either with being stuck with the silly inversion, or with again renaming, this time in the other direction. So I'll probably continue to hesitate for a while, hoping for help from Startly. It wouldn't bother me personally if play by abbreviation were a Mac-only feature, whether provisionally or permanently, and if that were the only way to get it quickly working I myself would even be all for that. Thanks again.
roymccoy
 
Posts: 22
Joined: Fri Jan 18, 2008 9:22 pm
Location: Rotterdam, The Netherlands

Re: Alternative abbreviations trigger?

Postby gb2 » Mon Dec 21, 2009 11:19 am

added additional comments to database. I think you are trying to use abbreviations in a way that isn't supported. Abbreviations are intended to be used when you are in a text field. Using them when not in a text field is going to give you wanted results. You should use chained hot key triggers if you want it to be trigger anywhere.
User avatar
gb2
Site Admin
 
Posts: 2871
Joined: Mon Feb 06, 2006 5:22 pm

Re: Alternative abbreviations trigger?

Postby roymccoy » Mon Dec 21, 2009 12:08 pm

That's right, I'm trying to use them in a way that isn't supported, but should be. I tried using chained hot key triggers, but they didn't work acceptably well either and so I wound up deleting all of them. I remember a general dissatisfaction, specifically I think regarding their having to be conscientiously typed at a slower-than-normal speed or something like that.

Why should abbreviations only be useable in text fields, when there are so many other occasions when a user wants to trigger a shortcut?

My question regarding feasibility has not been answered, and in the meantime I continue to suppose that playing by abbreviation could be relatively easily implemented. The abbreviation is saved with its shortcut, obviously, so why shouldn't it be enabled to work in any context, particularly if this isn't prohibitively difficult to program?

I'm not writing to have comments put into a database, and if I have to take this campaign elsewhere I will, as I'm sure others, both users and people at Startly, will appreciate and support the proposal.

Here below is a message I received last night from Olav Kvern at Adobe on this:

I think a reasonable approach would be to have your AppleScript store a kind of database of name shortcuts--AppleScript makes this sort of thing very easy to do with a list. That way, you could add shortcuts as you found you needed them, and you could change shortcuts as necessary, without having to rename QuicKeys. Your display dialog could be set up to "learn" as you enter shortcuts.

Basically, you'd replace the line:

set playThis to text returned of dialogResult

...with a routine that takes the returned text and uses it to locate the long name in a database. If the "key" isn't found, then the script should ask you which "long name" you want to associate the key with. The script would then add that key to the database, then run the named QuicKey. From that point on, you'd be able to type the shortcut you associated with the QuicKey. You'd start the process by entering the long names of all of your QuicKeys in the database. As you use the script, you'll also be adding the shortcuts to your database as you need them.

Ben Waldie has a great column on reading and writing pList files using AppleScript--I think this would be the perfect way to store your key/value data pairs. Storing and Accessing Data with AppleScript

I can take a shot at cooking something up, if either a.) this seems to daunting, or b.) this doesn't make sense.

I can see from this that it can be done, yes, even without reprogramming QuicKeys in any way, and I may wind up doing it in this kind of way - but only as a last resort, as it involves a considerable amount of work and a shortcut database apart from QK's own, which surely seems like a dubious idea. The abbreviations and mechanism for entering them already exist in QuicKeys, so it should only be a matter of making a connection to them so that they can be used more conveniently and, again, in other contexts than just one. Can you tell me who the QKM product manager is if it isn't you, and perhaps send me his or her e-mail address? Thank you.