Q: incorporating Launchbar's "clipmerge"

End user supplied how to documents and discussion.

Q: incorporating Launchbar's "clipmerge"

Postby Scott_R » Mon Sep 30, 2013 7:44 am

LaunchBar has a function called ClipMerge, where if you press Command-C twice in quick succession, the copied item is merged with the current Clipboard contents rather than replacing it.

I find this regularly useful for certain tasks, and I've attempted to create a Shortcut that incorporates it. It's set up this way:
1) Select All
2) Copy
3) Tab
4) Select All
5) Type Keystroke Command-C; Type: 2 times (that, is, the Type field in Details is set to 2 times, not that I have to steps to Type Command-C).

It doesn't work. The failure is in step 5; for some reason, it's either not being typed twice, or not typed quickly enough (LaunchBar makes a particular sound when Clipmerge is activated, and the step doesn't activate it; more to the point, the text is not merged).

Any thoughts?
Scott_R
 
Posts: 27
Joined: Thu Feb 16, 2006 7:46 pm

Re: Q: incorporating Launchbar's "clipmerge"

Postby gb2 » Mon Sep 30, 2013 9:38 am

I tried all combinations and couldn't get it to work either. My guess is that they may be looking at the physical keyboard or QuicKeys is not able to present the keystrokes the way it wants it. You can make the same functionality with QuicKeys.

create a variable named Temp storage

1) Assign Variable - Temp storage = Clipboard
2) Type Keystroke - command-c
3) Assign Variable - Clipboard = Temp storage & Clipboard
4) Message - set to Play Sound of your choice

step 3 will be the step that would probably not setup correctly - you have to make sure you get the text as all lozenges and not plain text - Temp storage should be light purple, & should be orange and Clipboard should be light brown. If you can't get them by typing then pick them from the Add Equation Item pop-up menu. Looks like you would need to create this shortcut and use an Insert Shortcut in your step 5 to mimic the clipmerge.
User avatar
gb2
Site Admin
 
Posts: 2870
Joined: Mon Feb 06, 2006 6:22 pm

Re: Q: incorporating Launchbar's "clipmerge"

Postby Scott_R » Wed Jan 21, 2015 4:02 pm

OK, first of all, apologies for the VERY belated response. Unfortunately, I hadn't been familiar enough with the ins and outs of the slightly more technical aspects of QKs and thus, after reading the above, I'd poked around a bit but without knowing what I was doing got nowhere.

A couple of months ago I revisited the issue and took the time to teach myself what I needed, and successfully set up a shortcut as above. So a very overdue thank you to gb2 for the information.

Until I upgraded Filemaker Pro. Basically, I'd been using the shortcut to grab first the contents of one field of FMP11, copy it to the clipboard, then go to a second field and append those contents to the first, then bringing the data outside of FMP. Worked just dandy for a while.

Then I finally upgraded to FMP13 just on the basis of a single new command it had that I needed.

And for some reason, this broke my shortcut and I cannot figure out why. Basically, I want from the shortcut yielding
[field one][field two]
(which is what I wanted) to it simply giving
[field two]
Here're the two shortcuts (one incorporates the second) and some commentary (in italics):

First Shortcut
1) Type Keystroke Command 2 This selects the first field via a script within Filemaker
2) Type Keystroke Command A
3) Type Keystroke Command C
4) Type Keystroke tab the second field is the next one in FMP's tab order
5) Type Keystroke A I've experimented by stopping the shortcut here (Step Results) and it works fine: the first field is copied and the second field is highlighted
6) Play Shortcut "Append"
the next step simply switches to the application I want to bring the results to

Second Shortcut ("Append")
1) Assign to variable: Temp Storage = Clipboard
2) Type Keystroke Command C
3) Assign to Variable: Clipboard = Temp Storage&Clipboard
they're all as lozenges, Temp Storage light purple, & orange, and Clipboard light brown

And again, THIS WORKED. I don't know why switching to FMP13 from 11 should make a difference.

Any insight would be appreciated.
Scott_R
 
Posts: 27
Joined: Thu Feb 16, 2006 7:46 pm

Re: Q: incorporating Launchbar's "clipmerge"

Postby gb2 » Wed Jan 21, 2015 5:29 pm

I don't see anything obvious. I'd make it one shortcut - I'm not sure why you have it as 2. Then use "Turn On Shortcut Debugging" in the Shortcuts menu and step through it with the Variables and Functions Editor open so that you can see the values at each step and see where it is failing.
User avatar
gb2
Site Admin
 
Posts: 2870
Joined: Mon Feb 06, 2006 6:22 pm

Re: Q: incorporating Launchbar's "clipmerge"

Postby Scott_R » Wed Jan 21, 2015 7:07 pm

Thanks for the help.

Well, that was odd.

Stepping through the shortcut with Debugging on, it worked just fine. Over and over, it gave the right results. Then, by chance, I hit Play rather than Step, and the same error returned. So, stepping through it worked fine, but playing it messed up the Shortcut.

On a hunch, I added a short pause (0.1 sec) before the Assign to Variable step, and that fixed it.

(As to why it was in two steps, I guess there was something in what I read at the time that implied it was a good idea. I combined them into one.

Thanks again.
Scott_R
 
Posts: 27
Joined: Thu Feb 16, 2006 7:46 pm


Return to QKM How Tos

Who is online

Users browsing this forum: No registered users and 5 guests