Add Google Search Option to the Right-Click context Menu


  1. Posts : 3
    win 10
       #1

    Add Google Search Option to the Right-Click context Menu


    hi
    i want add Google Search Right-Click context Menu

    I tried to apply the explanation here Add Google Search Option to the Right-Click context Menu Win. Explorer
    , to no avail

    I want to search file name via Google

    Add Google Search Option to the Right-Click context Menu-untitled.jpg

    @dalchina

    - - - Updated - - -

    Add Google Search Option to the Right-Click context Menu-4.jpgAdd Google Search Option to the Right-Click context Menu-3.jpg
      My Computer


  2. Posts : 42,634
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Hi, you're attempting to use the context menu. It looks as if you created the context menu entry successfully. However you are not using the file supplied. It seems you have created your own entry using Chrome.

    The basic problem is what you have done is that %1% is the whole path to the file and the file name- that's what you are passing to Chrome.

    My script (and I included the source of that) extracts the file name from the complete path.

    Example: say you are passing

    C:\Users\username\Music\Symphony 5 Beethoven.mp3

    to Chrome.

    My script passes just Symphony 5 Beethoven to the default browser.
    Last edited by dalchina; 03 Aug 2020 at 01:45.
      My Computers


  3. Posts : 42,634
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #3

    Here's what you need to do for the context menu - in my example, I've put Google.exe (my compiled script) on my desktop just for convenience. You can put it somewhere more appropriate.
    Add Google Search Option to the Right-Click context Menu-1.png

    Example showing the context menu and search result:
    Add Google Search Option to the Right-Click context Menu-untitled.png
      My Computers


  4. Posts : 3
    win 10
    Thread Starter
       #4

    Where can I find a file google.exe
    Like you have
      My Computer


  5. Posts : 42,634
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #5

    Thank you very much for taking the time to reply.


    See these two posts:
    Add Google Search Option to the Right-Click context Menu Win. Explorer

    and read
    Add Google Search Option to the Right-Click context Menu Win. Explorer

    That gives you the ability to modify it as you wish.
      My Computers


  6. Posts : 3
    win 10
    Thread Starter
       #6

    Thank you
    but have A question
    When I search for a file with a dot in it, it searches for just the text before the dot
    like
    google.chrome.yahoo.mp4

    When I search, it just searches for a word (google)
    It does not search for chrome.yahoo

    and i can use ur script to search in subscene.com ?

    - - - Updated - - -

    subscene.com
    I tried but didn't work with me
    Add Google Search Option to the Right-Click context Menu-212.jpg

    Add Google Search Option to the Right-Click context Menu-858.jpg
      My Computer


  7. Posts : 42,634
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #7

    I believe if you read the original thread the poster asked me to remove the extension from the search.

    What is extracted from the full path of the file clicked is determined by the handling of FilenameArray in that case.

    Autohotkey offers another command to split a file path which I used in a different case:
    Add Google Search Option to the Right-Click context Menu-1.png

    You could play with this and create a modified script.
    Note the use of msgbox to output a message for debugging.
      My Computers


  8. Posts : 1
    Windows 10 Pro
       #8

    @dalchina The .exe file works as it should when i use the "send to" method, when i add it directly to the right-click context menu it kind of breaks and all the pages that open in my default browser lead to "https://www.google.com/webhp" all the time.

    I looked at the script but unfortunately dont't know what elements i could modify.

    Could you please test this script again and try to modify it if neccessary? i searched all over the web and couldn't find any similar script that does this job

    Thank you!
      My Computer


  9. Posts : 42,634
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #9

    Sorry I don't have that available any more.
      My Computers


  10. Posts : 1
    Window 10
       #10

    The last update to make the add-on work properly
    - Edit ahk file
    from
    Code:
    https://www.google.com/#hl=en&q
    2
    Code:
    http://www.google.com/search?q=

    The code is completely: by AutoHotkey
    Code:
    ;
    ; Take filename.extension as parameter, search internet for filename only.
    ;
    Inputpath=%1%
    ;Msgbox, Inputpath=%Inputpath%
    SplitPath, Inputpath,FileName,
    FilenameArray := StrSplit(FileName,.,"")
    ;MsgBox % "The 1st word is " FilenameArray[1]
    Fname:=FilenameArray[1]
    ;MsgBox % "The file name is " Fname
    Run http://www.google.com/search?q=%Fname%
    Download:
    Google.exe.ahk...zip - Google Drive
    Or
    Copy&Go......drive.google.com/file/d/1oZjqVzjk9rMITflKW2v_TzulM9VG7oNO/view
    Or
    Add Google Search Option to the Right-Click context Menu Attached Files
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:09.
Find Us




Windows 10 Forums