Turnipsoft Forums
Offline Dictionary? - Printable Version

+- Turnipsoft Forums (https://www.turnipsoft.com/forums)
+-- Forum: Freda (https://www.turnipsoft.com/forums/forumdisplay.php?fid=1)
+--- Forum: Support (https://www.turnipsoft.com/forums/forumdisplay.php?fid=2)
+--- Thread: Offline Dictionary? (/showthread.php?tid=10861)



Offline Dictionary? - midas32 - 09-20-2022

Hi Jim,

I know that the Freda Windows app is supposed to have good integration with Perfect Dictionary from the Microsoft Store. Unfortunately, Perfect Dictionary seems to be abandoned and unsupported, and for new users it is impossible to download dictionary files due to errors within the app.

Other than Perfect Dictionary, are you aware of any other offline dictionaries that integrates well with Freda on Windows?

Thanks.


RE: Offline Dictionary? - jim_chapman - 09-24-2022

(09-20-2022, 02:56 PM)midas32 Wrote: Hi Jim,

I know that the Freda Windows app is supposed to have good integration with Perfect Dictionary from the Microsoft Store.  Unfortunately, Perfect Dictionary seems to be abandoned and unsupported, and for new users it is impossible to download dictionary files due to errors within the app.

Other than Perfect Dictionary, are you aware of any other offline dictionaries that integrates well with Freda on Windows?

Thanks.

Sorry to hear that.  I just checked PerfectDictionary and you're quite right - it doesn't seem to be supported any more.  I'll have a look around for alternatives.  The way that Freda launches a third-party dictionary is by trying to launch a web-request to a URL that you can supply; the drop-down in the dictionary popup lets you specify how that URL is built - by default it is "define:" followed by the word you want to look up.  That worked for PerfectDictionary because that app registers itself with the Windows operating system as a handler for the URL scheme 'define' (that is to say it informs the computer that any time it sees a URL beginning with 'define:' it should hand it on to PerfectDictionary, because PerfectDictionary knows how to interpret it).

So the answer is to find another dictionary app that registers itself to handle 'define' URLs, or indeed any other URL scheme that we can then type into Freda's dictionary setup dropdown.

So far I didn't find one.  WordWeb looked potentially useful, but unfortunately it can only be launched using the Windows command line, or by invoking DLL methods and, because Freda is a UWP Store App, that's forbidden by Windows security.  I do expect this to change in the future, so I will be working on it for future Freda releases.


RE: Offline Dictionary? - midas32 - 09-28-2022

(09-24-2022, 11:11 AM)jim_chapman Wrote:
(09-20-2022, 02:56 PM)midas32 Wrote: Hi Jim,

I know that the Freda Windows app is supposed to have good integration with Perfect Dictionary from the Microsoft Store.  Unfortunately, Perfect Dictionary seems to be abandoned and unsupported, and for new users it is impossible to download dictionary files due to errors within the app.

Other than Perfect Dictionary, are you aware of any other offline dictionaries that integrates well with Freda on Windows?

Thanks.

Sorry to hear that.  I just checked PerfectDictionary and you're quite right - it doesn't seem to be supported any more.  I'll have a look around for alternatives.  The way that Freda launches a third-party dictionary is by trying to launch a web-request to a URL that you can supply; the drop-down in the dictionary popup lets you specify how that URL is built - by default it is "define:" followed by the word you want to look up.  That worked for PerfectDictionary because that app registers itself with the Windows operating system as a handler for the URL scheme 'define' (that is to say it informs the computer that any time it sees a URL beginning with 'define:' it should hand it on to PerfectDictionary, because PerfectDictionary knows how to interpret it).

So the answer is to find another dictionary app that registers itself to handle 'define' URLs, or indeed any other URL scheme that we can then type into Freda's dictionary setup dropdown.

So far I didn't find one.  WordWeb looked potentially useful, but unfortunately it can only be launched using the Windows command line, or by invoking DLL methods and, because Freda is a UWP Store App, that's forbidden by Windows security.  I do expect this to change in the future, so I will be working on it for future Freda releases.

Thank you Jim. Coincidentally, I also looked into WordWeb's capabilities to be called from command line, and with a little bit of Windows registry editing, I was able to register a custom URL protocol that launches WordWeb using DLL methods.

My lack of imagination prompted me to name the custom URL protocol simply, "wordweb:" and launching a command "wordweb:test" would actually result in WordWeb opening and present me the definition of the word "test".

I then tried to integrate this with Freda. Using the built-in "define:={0}" example, I replaced the lookup string with "wordweb:{0}" and to my surprise Freda actually was able to launch WordWeb.

The unfortunate thing is that when Freda launches WordWeb in this manner, Freda doesn't pass just the word that was highlighted. It ends up passing the whole string as the query to WordWeb. For example's sake, if I highlighted the word "test" and tried to use Freda to call, what gets passed to WordWeb is "wordweb:test" instead of just "test". While WordWeb does launch the definition lookup fails because it's being asked to look up the entire string instead of just the word.

From my initial reading, it seems like this might be a limitation of how the URL protocol just works in Windows. I'm no programmer though so I could be very wrong. This approach showed a little bit of promise, but if it is indeed a Windows limitation, then it's kind of a dead end. Sad

Still, just wanted to share that.