Google, Dictionary, Thesaurus Search

Post a reply


In an effort to prevent automatic submissions, we require that you type the text displayed into the field underneath.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Google, Dictionary, Thesaurus Search

Re: Google, Dictionary, Thesaurus Search

Post by FanaticGuru » 01 Feb 2017, 16:55

becritical wrote:Thank you but I am not having any luck! I changed to the full path and also checked the windows registry exists and it's exact and it is FirefoxURL.
I still get the same message. "failed to lunch program...." Action: <http://www.google.com/search.... q=UserChoice"
In order to debug I would start simple and try just running this code to see if an AHK script can start Firefox on your system:

Code: [Select all]GeSHi © Codebox Plus

Run, firefox.exe

FG

Re: Google, Dictionary, Thesaurus Search

Post by becritical » 01 Feb 2017, 10:26

okay I got past that error, I was having a problem with the Run command because I had to change to U64.

now I have another issue, I get an error at the Run, %browser% %Address% line. "The system cannot find the file specified"

Re: Google, Dictionary, Thesaurus Search

Post by becritical » 01 Feb 2017, 07:22

Thank you but I am not having any luck! I changed to the full path and also checked the windows registry exists and it's exact and it is FirefoxURL.
I still get the same message. "failed to lunch program...." Action: <http://www.google.com/search.... q=UserChoice"

RegRead, ProgId, HKEY_CURRENT_USER, Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice, Progid
Browser := "iexplore.exe"
if (ProgID = "ChromeHTML")
Browser := "chrome.exe"
if (ProgID = "FirefoxURL")
Browser := "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
if (ProgID = "AppXq0fevzme2pys62n3e0fbqa7peapykr8v")
Browser := "microsoft-edge:

Any idea?


FanaticGuru wrote:
becritical wrote:I can't see to get this to work, I get "failed attempt to launch program or document, action <http.......> params:<> the system cannot find the file specified and a pointer to line Run,%browser% %address% and I have checked the registry entry it is correct it points to firefoxURL

The script does Run, firefox.exe. Maybe you have Firefox installed somewhere that Windows is not able to find it.
This is the part that tries to figure out what the default browser is on the system.

Code: [Select all]GeSHi © Codebox Plus

RegRead, ProgID, HKEY_CURRENT_USER, Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice, Progid
Browser := "iexplore.exe"
if (ProgID = "ChromeHTML")
Browser := "chrome.exe"
if (ProgID = "FirefoxURL")
Browser := "firefox.exe"
if (ProgID = "AppXq0fevzme2pys62n3e0fbqa7peapykr8v")
Browser := "microsoft-edge:"

You might change the line Browser := "firefox.exe" to include the entire path to firefox.exe.

FG

Re: Google, Dictionary, Thesaurus Search

Post by FanaticGuru » 17 Nov 2016, 20:23

becritical wrote:I can't see to get this to work, I get "failed attempt to launch program or document, action <http.......> params:<> the system cannot find the file specified and a pointer to line Run,%browser% %address% and I have checked the registry entry it is correct it points to firefoxURL

The script does Run, firefox.exe. Maybe you have Firefox installed somewhere that Windows is not able to find it.
This is the part that tries to figure out what the default browser is on the system.

Code: [Select all]GeSHi © Codebox Plus

RegRead, ProgID, HKEY_CURRENT_USER, Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice, Progid
Browser := "iexplore.exe"
if (ProgID = "ChromeHTML")
Browser := "chrome.exe"
if (ProgID = "FirefoxURL")
Browser := "firefox.exe"
if (ProgID = "AppXq0fevzme2pys62n3e0fbqa7peapykr8v")
Browser := "microsoft-edge:"

You might change the line Browser := "firefox.exe" to include the entire path to firefox.exe.

FG

Re: Google, Dictionary, Thesaurus Search

Post by becritical » 17 Nov 2016, 08:06

I can't see to get this to work, I get "failed attempt to launch program or document, action <http.......> params:<> the system cannot find the file specified and a pointer to line Run,%browser% %address% and I have checked the registry entry it is correct it points to firefoxURL

Re: Google, Dictionary, Thesaurus Search

Post by rommmcek » 16 Mar 2016, 04:36

Awesome display style in Thesaurus Search!!!

Thanks!

P.s.: Why do you stick with this editor like history behavior?

Re: Google, Dictionary, Thesaurus Search

Post by FanaticGuru » 15 Mar 2016, 12:19

Updated Google on First Page

Version: 1.21
Change Log: 2016-03-15


  • Add Microsoft Edge as a possible browser default

Added Thesaurus on First Page

Version: 1.0
Change Log: 2016-03-15


  • Has a better gui than Dictionary that shows the word in a box at the top
  • Can {tab} to move to the box at top and enter new word

FG

Re: Google and Dictionary Search

Post by rommmcek » 10 Mar 2016, 23:47

Thank you FG, for a professional update!
I just got addicted to this great idea of yours!

Re: Google and Dictionary Search

Post by FanaticGuru » 10 Mar 2016, 03:35

Updated Dictionary on First Page

Version: 1.21
Change Log: 2016-03-10


  • Added s flag to RegEx where need to accommodate for stray `n or `r in HTML code
  • Removed node that advertised Thesaurus.com

FG

Re: Google and Dictionary Search

Post by rommmcek » 09 Mar 2016, 21:04

Adding s to RegExMatch seems to solve the problem!, so:

Code: [Select all]GeSHi © Codebox Plus

  if RegExMatch(Http_Text,"sU)(<div class=""center-well-container"".*)<div class=""source-meta"">", Section)
Section := Section1 "`n<br>"
works fine enough for me.

Edit: With this replace works better without -s option:

Code: [Select all]GeSHi © Codebox Plus

stringreplace, Http_Text, Http_Text, `r,, all

Re: Google and Dictionary Search

Post by rommmcek » 08 Mar 2016, 20:57

That's what I was scared of! Dictionary doesn't work anymore.

I modified your editor like behavior for history and made saving it to file.
I added "Word origin" and <br> at the end, to show all content in every case.
I added "More suggestions" after "Did you mean ...?".
So at first I thought that my modifications were the reason.

But then even your original script responses with "NO results found on Dictionary.com" only.
Too bad!

Here is my Thesaurus.com based on modified Dictionary.ahk, with a bit uncommon and even inconsequent approach.
I think the site was easier to decipher and still works. (Probably wasn't modified yet!)

bye!

Edit: Update!
Attachments
iThesaurus1.0.5.ahk
(13.01 KiB) Downloaded 100 times

Re: Google and Dictionary Search

Post by rommmcek » 06 Jul 2015, 14:50

Thanks for prompt answer!
I'm running it all the time too! Unfortunately am I not on the line all the time.
Thrilling to see FG thesaurus.com
Hoping to comprehend tricks thoroughly soon!

bye!

Re: Google and Dictionary Search

Post by FanaticGuru » 06 Jul 2015, 12:41

rommmcek wrote:Hi, again!

Still enthusiastic about your Dictionary. One more question 'cause didn't 've profound study of your code yet.
Will it work forever? What if they change site conception?

Thank you, forever!

The script depends on Dictionary.com to get the definitions. If the html code that site returns when a definition request is sent changes significantly then the script will need to be modified. The modifications should not be that difficult.

The script is one of my standard bootup scripts that is always running on my computer so I intent to keep it updated for the foreseeable future.

At some point when I get the time I would like to add a script that does a similar thing for thesaurus.com to display synonyms and antonyms.

FG

Re: Google and Dictionary Search

Post by rommmcek » 06 Jul 2015, 11:07

Hi, again!

Still enthusiastic about your Dictionary. One more question 'cause didn't 've profound study of your code yet.
Will it work forever? What if they change site conception?

Thank you, forever!

Re: Google and Dictionary Search

Post by rommmcek » 19 Jun 2015, 23:29

Once again,

Brilliant, brilliant, brilliant!!!

Thank you so much FanaticGuru!

Re: Google and Dictionary Search

Post by FanaticGuru » 18 Jun 2015, 18:31

Updated Dictionary on First Page

Version: 1.2
Change Log: 2015-06-18


  • Remove unneeded information through Html DOM instead of using CSS to set to Display:none (Display:none still allowed the information to show up during Copy & Paste)
  • Added History, when Gui is active Left and Right Arrows go back and forth through history

It is worth noting that an HtmlFile does not seem to support getElementsByClassName so I added a function to walk through the DOM by getElementsByTagName and then checked those for the proper ClassName to remove then used child.parentNode.removeChild(child) to remove the unneeded nodes. I could have done it with a RegEx function but I wanted to figure out how to do it with DOM. I spent a good deal of time banging my head trying to make getElementsByClassName work trying ever way I could think of before I gave up on it.

Html DOM is great but tricky to figure out what all you can do as document objects, web browser objects, CSS, JavaScript etc. all flow together and overlap.

FG

Re: Google and Dictionary Search

Post by rommmcek » 12 Jun 2015, 18:38

It's a very fast, mind blowing idea! (Not only for dictionary. I already imagine adds free browsing!)
P.s.: Yes, skipping back-forth either in form of buttons or Alt-Left-Right respectively would be conducive!
P.p.s.: I noticed, that after Ctrl-A and in some lines highlighting till linefeed, Ctrl-C copies to clipboard more then just in Gui displayed text.

regards!

Re: Google and Dictionary Search

Post by Joe Glines » 11 Jun 2015, 21:13

This is awesome! How about throwing in a back button?

Re: Google and Dictionary Search

Post by AlleyArtwork » 11 Jun 2015, 20:26

This dictionary search is fantastic!

Re: Google and Dictionary Search

Post by FanaticGuru » 13 May 2015, 17:07

Updated Dictionary on First Page

Version: 1.1
Change Log: 2015-05-13


  • General improvements in formatting and display of html
  • Used html styles to format text instead of RegExReplace for most of the formatting
  • Added ability to use Ctrl-C to copy from Gui
  • Added ability to select text in Gui then hit hotkey to find the definition of a word within a definition
  • Added ability to Double Click on a word in the Gui to find the definition of a word within a definition
FG

Top