'How to program a URL? (For search query)

A co-worker of mine shared an autohotkey script (it's actually an exe file that runs on the background). Anyways, when I click the hotkeys it opens up a company webiste and creates a shared query for whatever's on the clipboard. I was wondering how this is done and how I can make my own.
I'm specially curious about the "URL" modification that includes all these search options:

https://<COMPANYWEBSITE>/GotoDocumentSearch.do

That's the URL where I can search (sorry it's restricted and even if I link it you cant access it).
Anyways, after I set up all my options and stuff and click the search button I get the following URL:

https://<COMPANYWEBSITE>/DocumentSearch.do

I inspected the website source and this is the function that's called when I press the search button:

function preSubmitSearch(docPress) {
    document.pressed = docPress;

    // setup local doc types for submit by lopping over multi selects and building json data string
    var localDocTypesJson = "{";
    var sep = "";
    jQuery(".localTypeSel").each(function (i) {
        var selLocalTypes = jQuery(this).multiselect("getChecked");
        // get doc type code from id ex. 'localTypeSel_PD'
        //window.console.log("this.id=" + this.id);
        var tmpArr = this.id.split("_");
        var docTypeCode = tmpArr[1];
        var selLocalTypesCnt = selLocalTypes.length;
        if (selLocalTypesCnt > 0) {
            var localTypes = "";
            var sep2 = "";
            for (var i2 = 0; i2 < selLocalTypesCnt; i2++) {
                localTypes += sep2 + "\"" + selLocalTypes[i2].value + "\"";
                sep2 = ",";
            }
            localDocTypesJson += sep + "\"" + docTypeCode + "\": [" + localTypes + "]";
            sep = ",";
        }
    });
    localDocTypesJson += "}";
    jQuery("#localDocTypesJson").val(localDocTypesJson);
}

HOWEVER, the working code that was shared with me (that was written ages ago by some employee who's not here anymore). Has the following URL when I use the autohotkey:

https://<COMPANYWEBSITE>/DocumentSearch.do?searchType=all&localDocTypesJson=7D&formAction=search&formInitialized=true&searchResultsView=default&btn_search=Search&docName=*<CLIPBOARD>*&wildcards=on&docRevision=&latestRevOnly=true&docProjectNumber=&docEngChangeOrder=&docLocation=&findLimit=500&docTypes=Customer+Drawing&docTypes=Production+Drawing&docTypes=Manufacturing+Process+Document&docTypes=Specification+Or+Standard

Note: replaced text with "CLIPBOARD" for clarification.
I was wondering if that's a type of "URL-programming" or how can I make a direct URL that prompts for the search results from the website? is that Javascript? or how is that programmed? (I know Swift and some Java, but have never really used Javascript).



Solution 1:[1]

It doesn't seem like you are asking an AutoHotKey (AHK) question, but to give you an AHK example you can copy, here is how I would use AHK to use Google.com to search for whatever is in my clipboard:

wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := true
wb.Navigate("https://www.google.com/search?q=" . StrReplace(Clipboard, " ", "+") . "", "")

Note, the URL format includes the query ("?q=whatever+you+had+in+Clipboard") in it with spaces replaced by "+"s.

Hth,

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rob Bednark