norio-nomura / EasySIMBL

EasySIMBL is modified "SIMBL" for OS X 10.7, 10.8, 10.9 or 10.10 supporting sandbox, resume. No installer.
819 stars 76 forks source link

Injecting simbl into background processes #31

Open jrhe opened 8 years ago

jrhe commented 8 years ago

@norio-nomura

I have installed an old version of SIMBL on El Capitan using your instructions but this old version doesn't allow loading of plugins into background processes.

I am attempting to create a plugin for the lookup view (Right click, "look up") which records what has been looked up so that unfamiliar words can be automatically fed to anki or other places. To do this I want to intercept calls to the LookupViewService (/System/Library/Frameworks/Foundation.framework/Versions/C/XPCServices/LookupViewService.xpc/Contents) which is an XPC process started by launchd (although seemingly not listed by it). All attempts to do so have been fruitless, including attempting to reboot the process to make sure SIMBL is loaded when it loads.

Any guidance on how to inject a plugin into a background process would be greatly appreciated.

norio-nomura commented 8 years ago

I don't know whether the background processes accept Apple Event or not, but have you tried the instruction on https://github.com/norio-nomura/EasySIMBL/issues/25#issuecomment-120697440 ? The original SIMBL does not detect launching of background process, but the injection mechanism is not limited to foreground process.