sabrogden / Ditto

Ditto is an extension to the Windows Clipboard. You copy something to the Clipboard and Ditto takes what you copied and stores it in a database to retrieve at a later time.
https://ditto-cp.sourceforge.io/
3.95k stars 208 forks source link

fix FocusCaret to get caret in Chrome #593

Closed PzaThief closed 11 months ago

PzaThief commented 11 months ago

To solve #375 I added a logic to find caret position from Chrome via oleacc.dll. Now Ditto can find caret from more variety application like VS, VS Code, etc. But like as the reference that @u-Sir gave, It is not cover UWP applications yet. So, this is just first solution of the issue (because i think Chrome is more important than any others) and I will decide whether to add a logic to support UWP apps after.

sabrogden commented 11 months ago

fantastic change, what would the change be to support uwp apps?

PzaThief commented 11 months ago

Owner

Seems to use UIAutomation that is first time to use for both of Ditto and me. Just it. But it is in Windows SDK, already Ditto has, so there is nothing special to do something else(perhaps). Please understand that I am slacking off for a while hahaha

sabrogden commented 11 months ago

ok to call LoadLibrary over and over, mostly looks like yes, https://stackoverflow.com/questions/3497516/does-loadlibrary-create-distinct-instances but i've always loaded it up front and did GetProcAddress up front.

PzaThief commented 11 months ago

ok to call LoadLibrary over and over, mostly looks like yes, https://stackoverflow.com/questions/3497516/does-loadlibrary-create-distinct-instances but i've always loaded it up front and did GetProcAddress up front.

Thank you for suggestion! I'll fix it in next update!