Clipping Service

Hello all

I run Scrivener with four projects open at the same time. I do some research via Safari and when I find something I like I use the Clipping Services to move the material into Scrivener.

The dialog box appears so the clipping can be named, but is there also a way to specify which project to place the clipping into?

Thanks
-mpuk

There isn’t a way of doing that; except to make sure the target project was the last active one before switching to Safari. Since that will usually be the case, it kind of happens “automatically” for most people I think.

Hi AmberV

Thanks for the response.

It doesn’t seem to work like that. If I go to Scrivener and make Project4 active and then I move to Safari and make the clipping, it returns and puts it into Project2.

What else can be determining where it puts it?

Thanks

(PS - I’m on OS X 10.6.8 and Scrivener 2.1)

Hmm, I can’t reproduce that with Safari on Lion; and my SL computer is on loan at the moment. To narrow down the variables; which service are you using? I was testing with “Make New Clipping (Unformatted)” and “Make New Clipping”.

I’m on Snow Leopard (10.6.7) and I can’t reproduce this. Make New Clipping creates a new clipping in the frontmost Scrivener project (i.e. the one active before switching to Safari).

I’ve done some more testing and I have narrowed it down.

The Clipping is consistently placed in the first project that Scrivener auto-loads on startup of the application. It makes no difference what project I make active immediately before I take the Clipping from Safari.

Scrivener is autoloading all four of my projects on startup and I want this. I tried quitting the Scrivener application with one particular project active to see if it would make that project the first that Scrivener autoloaded upon relaunch (and therefore the project to which it inserts the Clipping) but I cannot seem to spot the pattern here of the order in which it autoloads.

AmberV, I am using the [Scrivener: Make New Clipping] service which in my list of services upon rightclick, is second from the top.

Any ideas?

Thank you
-mpuk

Hello Ioa and Keith

I’ve done a few more rounds of testing and I cannot get this to perform consistently. On some occasions the Clipping defaults to the first project autoloaded and on other occasions it defaults to the active project and on other occasions it goes to one of the other four projects I’ve got loaded.

I cannot spot a consistent pattern.

Keith, based on your code, how is it designed to work when there are multiple projects loaded? And are you able to replicate this issue?

Thank you
-mpuk

Hi,

No, I’m not able to replicate this issue. The way the code works is this:

  1. It tries to grab the current project - the focussed project. However, when Scrivener is inactive, OS X usually considered no project to be current, and thus this would normally fail.

  2. Failing (1) - which I would expect to be pretty much always, except when you use a service within Scrivener itself - it gets a list of ordered documents (projects), front-to-back, and uses the frontmost (top) one.

The text always gets sent to the main window.

Could it be that you have a QuickReference window from the project that receives the text in front of the window you thought would receive the text?

All the best,
Keith

Hi Keith

Thanks for your response.

I don’t use the QuickReference feature so there are none of this type of window open.

I’m not sure what else to add in order to further the discussion. I’m stumped.

It’s not a crisis. My workaround has been to drag project windows around and drop the Clippings from one project into another but it gets a bit tedious after a while. Would you see scope to add a dropdown to the Clipping dialog box in order to specify target project as well as Clipping name? (In a future version of course.)

The only other tangent coming to mind is an application I use called Stay by Cordless Dog (http://cordlessdog.com/stay/). It’s a great little application for automatically resizing windows for users who move between laptop screen and external monitor. Is there any chance that since it does something with application windows that it is interfering with Scrivener’s or OS X’s assessment of what the current window is?

Cheers
-mpuk

Slim chance; it probably uses the accessibility hooks to manipulate windows, and if coded incorrectly, manipulating windows with those hooks can cause program focus to act in unintuitive fashions, or cause window positions to not be truly monitored by the application (and thus saved into its preference system, if it tracks that stuff). You typically see this in programs that make dragging and resizing easier though. BetterTouchTool, Zooom!, Divvy, and so forth—though all of those have been updated to work better with the rest of the operating system in recent years.