Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Dictionary - Get All Definitions of an Entered or Selected Word


  • Please log in to reply
35 replies to this topic
rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011
Easily display the definitions of a word. Words with multiple meanings will have all the variations displayed.
  • Shift+Ctrl+D - Displays and InputBox so you can enter the word to be defined.
  • Ctrl+Win+D - Use the currently selected word as the word to be defined.
  • If the word to be defined is misspelled, a dialog box will be displayed presenting reference.dictionary.com's best guess for the correct spelling. Select Yes to have the correctly spelled word defined.
The definitions are word wrapped and formatted in an easy to read/copy style.
 
Screen shot:
Spoiler

 
Here is the script:
Spoiler

 
My thanks to Mario1776 for FindDef, the inspiration for this script.

Edited by rbrtryn, 18 June 2013 - 01:55 AM.

My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011

Optimization: Removed and/or combined some regexs. Used Instr() or SubStr() whenever practical.

 

Feedback appreciated!  grin.png


My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011

Major Update:

  • Added smart word wrapping to the individual definitions (see new screenshot).
  • Added additional white space to improve readability

My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


oldbrother
  • Members
  • 149 posts
  • Last active: Nov 09 2014 07:36 PM
  • Joined: 06 Jul 2005

Very nice! thanks!



Cragaha
  • Members
  • 265 posts
  • Last active: Jan 04 2016 02:24 AM
  • Joined: 19 Nov 2010

Why are you using HttpRequest just to download a web page?!

Doesn't it work with URLToVar/File?



rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011

Why are you using HttpRequest just to download a web page?!

Doesn't it work with URLToVar/File?

 

  • In my experience UrlDownloadToFile does not accurately translate between code pages. Especially with unicode AHK, I would get a euro sign instead of a dash or a yen sign or even a box where it couldn't translate the character at all. It could be something I am doing wrong, but I have never had this problem with HttpRequest.
  • There is no significant performance difference between HttpRequest and UrlDownloadToVar.
  • In other scripts I use HttpRequest to upload post data. For consistency and the reasons above, I have decided just to use HttpRequest in all cases.

My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


Guest10
  • Members
  • 1216 posts
  • Last active: Oct 30 2015 05:12 PM
  • Joined: 27 Oct 2012

very nice! put to my daily use immediately... however, seems a bit limited in its search prowess. could not find/identify word "Verdana"?



rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011

very nice! put to my daily use immediately... however, seems a bit limited in its search prowess. could not find/identify word "Verdana"?

 

That's because Verdana is not a word you would find in any dictionary. wink.png    According to Wikipedia:

 

The name "Verdana" is based on a portmanteau of verdant (something green), and Ana (the name of (Virginia) Howlett's eldest daughter)

 

It should find any word that is defined on dictionary.reference.com.


My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011

Update:

  • No longer requires HttpRequest.
  • Utilizes a more efficient and more accurate method of word wrapping, thanks to tidbit.
Why are you using HttpRequest just to download a web page?!

Doesn't it work with URLToVar/File?

 

As noted above, I had been getting strange characters using UrlDownloadToFile. This turned out to be my error happy.png . I didn't realize that I needed to set FileEncoding to UTF-8.


My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


Guest10
  • Members
  • 1216 posts
  • Last active: Oct 30 2015 05:12 PM
  • Joined: 27 Oct 2012

thanks, tested and works!



Alibaba
  • Members
  • 435 posts
  • Last active: Nov 19 2014 04:21 PM
  • Joined: 01 Nov 2012

Very useful!

Definitely needs also a german implementation, in my opinion. happy.png


Find the recent autohotkey version here: ahkscript.org


nnnik
  • Members
  • 1625 posts
  • Last active: Sep 26 2015 10:58 PM
  • Joined: 28 Jul 2012

Mit Duden Online sollte das realisierbar sein.

 

It should be possible with Duden Online.


Visit the new forum ahkscript.org.

http://ahkscript.org


Alibaba
  • Members
  • 435 posts
  • Last active: Nov 19 2014 04:21 PM
  • Joined: 01 Nov 2012

Mit Duden Online sollte das realisierbar sein.

 

It should be possible with Duden Online.

 

Yes, you only have to change the RegEx...


Find the recent autohotkey version here: ahkscript.org


nnnik
  • Members
  • 1625 posts
  • Last active: Sep 26 2015 10:58 PM
  • Joined: 28 Jul 2012

only the RegEx.... sounds like only half the Program.


Visit the new forum ahkscript.org.

http://ahkscript.org


Alibaba
  • Members
  • 435 posts
  • Last active: Nov 19 2014 04:21 PM
  • Joined: 01 Nov 2012

half of the program is less than the whole program...

where is the problem? grin.png


Find the recent autohotkey version here: ahkscript.org