Want to change the google search to customer search.
-
Does NppExec suffer from the same character limitations? Seems like that would work or I’m sure you could use a python script.
-
Python is beyond my skill.
-
I tried the .bat option and it looks like it still cuts off the url. It will not take the highlight search term and parse it into the url. I though this was going to be an easy thing.
-
if it does not even work from a .bat or .cmd with the length of your url, i suppose it is beyond of anything that can be started from a command line.
if this url is that long, you could try to run it through the windows explorer api, by creating a link shortcut (.lnk file) by right clicking on your desktop, and creating new > shortcut, with the parameters
"path_to_your\browser.exe" "https://your_long_url"
if your url would work from a desktop shortcut (.lnk), you could use a script, or one of the available exe tools on the internet, to create a .lnk file programmatically.
-
@Cary-Korn said:
I tried the .bat option and it looks like it still cuts off the url. It will not take the highlight search term and parse it into the url. I though this was going to be an easy thing.
It would have been easy, except you’re dealing with the interface between an application and windows and another application; there are some things that are out of your control.
However, I think I found a .bat variant that will work.
Create a batchfile at a known location (I made mine as
c:\usr\local\scripts\longurl.bat
), containing the single line"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "https://test.my.testforce.com/_ui/search/ui/UnifiedSearchResults?searchType=2&sen=a0T&sen=0WO&sen=a0W&sen=ka&sen=00O&sen=00P&sen=a0b&sen=00T&sen=015&sen=00U&sen=a4j&sen=a1F&sen=a0h&sen=00a&sen=a1S&sen=0F9&sen=a1U&sen=08p&sen=a1X&sen=a3c&sen=02s&sen=001&sen=068&sen=003&sen=500&sen=005&sen=501&sen=006&sen=a6M&sen=a0L&sen=a0M&str=%1"
The first part is the full path to the chrome browser, in quotes (because of the spaces in the path); the second part is all of the long url, except the search term; use the %1 instead of the search term. (If you don’t want to use chrome, use the full path to your browser executable of choice.)
Second, edit
shortcuts.xml
and add<Command name="longurl" Ctrl="no" Alt="yes" Shift="no" Key="116">c:\usr\local\scripts\longurl.bat $(CURRENT_WORD)</Command>
(making sure to use your batchfile path, not mine.)
Save, exit Notepad++, reload. Highlight a word (I highlighted
TestString
) and hitAlt+F5
(which is the alias I used in the command above): this properly opened chrome with the full URL, including the search string; because it was a dummy URL, it didn’t go anywhere, but chrome displayed the full URL through the end of theTestString
, which is something that hadn’t happened in my previous experiments. -
@PeterJones said:
On what site do you want to search from Notepad++?
This site does not exist"https://test.my.testforce.com/
-
I was just using the OP’s dummy query, which was obfuscated to prevent us from knowing what site they were actually searching. (My guess is it is one of the services that provides cloud-based services for corporations, and the OP was trying to obscure which one.)
Given that the root cause of the problem was not the website, but the interface between Notepad++, Windows, and the browser, it doesn’t bother me that the OP used a dummy website (though really, using the .example top-level domain is a better choice than trying to fake a .com; you never know when creating a dummy URL with a legal-style domain will accidentally intersect with a real machine).
The fake URL given was sufficient to show us the problem; and using that fake URL, I was able to present a solution that would allow the entire more-than-260-character URL to be passed to the browser, so it was a reasonable choice.
-
@PeterJones
I did a search on the site from Notepad++, it is necessary to see how the search engine makes a request. Each machine has different requests. Here are my examples (my code does not insert, says it’s spam and I took a screenshot ) -
Maybe I’m dumb here, but why wouldn’t all sites do it differently? I mean, they could do it the same way (sometimes “standards” develop by imitation), but…
-
Based on the thread as a whole, I am confident we have provided enough information for @Cary-Korn to know where in the URL the
$(CURRENT_WORD)
needs to go (ie, in the place of the “str=test” in the example dummy URL that @Cary-Korn provided), regardless of what search engine is used. If @Cary-Korn obfuscated the real URL being used, I am working under the assumption that there will be no difficulty un-obfuscating the URL back to something that is functional.The problem being asked about in this thread was not “what is the right URL for such-and-such a search engine?” The question was how to transmit said URL to the browser without the end being cut off. That’s the problem I attacked, and has worked in my tests of my solution.
-
maybe QTranslate is not the perfect translator after all 😉
the url that the original poster needs is very long.
it is so long, that it gets cut off and shortened.
the resulting url is incomplete at his browser’s address bar.
(his browser gets only a part of the complete url address that is necessary for the search to work.)now we just have to sit and wait, because the original poster has not yet replied to peter’s last suggestion on how he could work around this url string length restriction.
-
Gentlemen and comrades …I wanted to say that without knowing the real address of the site to find a solution to this problem can not be. And I didn’t want to insult anyone …I conduct correspondence through Google-translator
-
@andrecool-68 said:
I wanted to say that without knowing the real address of the site to find a solution to this problem can not be.
yes i know, but somehow this topic has caught our interest.
I didn’t want to insult anyone …
don’t worry, i can not see anything insulting. google translator did not add any hidden insults to your text ;-)
-
Unfortunately I have been unable to get any of the suggested solutions to work. I appreciate all the help. I didn’t think this would be so tough.
-
@Cary-Korn said:
Unfortunately I have been unable to get any of the suggested solutions to work. I appreciate all the help. I didn’t think this would be so tough.
If you still want help, you are going to have to be more specific than that.
I tested my 2019-03-01T14:22:23.197Z post pretty thoroughly, and it worked exactly as I expected, passing chrome the full URL.
So, things we will need to know in order to keep helping you:
- What browser do you want the URL to go to? Chrome? Firefox? Edge? IE? Something else?
- If it’s Chrome or Firefox or , we will need the full path to your browser: you should be able to right click on your browser shortcut (or, if it’s active on your toolbar, right click on the icon, then again on the application name) to get you to the Properties window, and copy the full path there.
- If it’s Edge or IE, we’ll use the Microsoft-special notation for accessing those browsers. 'coz microsoft.
- What is the exact version of Notepad++ you are using? Maybe your version is behaving differently than mine
- it would be easiest if you went to the menu ? > Debug Info > Copy debug info into clipboard, and pasted the results here.
- what exact sequence did you use when editing the
shortcuts.xml
? - exactly how long is your URL?
- Did you try my exact circumstance from my 2019-03-01T14:22:23.197Z post, or did you make changes to the URL before saving the batch file?
- when I did that setup, making sure to save the setup, exit Notepad++, and then reload, it sent the really long URL to chrome properly
- if you did try this, with the DUMMY URL, how exactly did it fail? (saying “didn’t work” is so generic as to be useless for helping us help you)
- Did it not try to do anything? If so, where exactly did you save
longurl.bat
? Did you make theshortcuts.xml
point to the real location oflongurl.bat
, or did you leave it pointing to my location forlongurl.bat
- Did it not open chrome?
- Did it open chrome and try to go to the full dummy URL, and fail because it didn’t exist? This is what I would expect. In which case, I would say it didn’t fail, because that was the expected behavior.
- Or did open chrome, but truncate the URL?
-
Once I made the batch file, it never truncated the URL on me.
-
I just tried 2138 characters in the dummy URL, plus the
%1
search string in my batch file, which got replaced by$(CURRENT_WORD)
from Notepad++, which was the exact textlongurl
, and chrome tried to open that page with the full 2144 character URL; because that machine doesn’t exist, chrome told methis site can't be reached
, but it actually tried to go there, and the full URL was in the browser bar. If I change my batch file to"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "https://www.google.com/search?ie=UTF-8&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&q=%1" pause
cmd.exe
window stays open until you hit enter or space or something, I saw the full URL in thecmd.exe
window, I saw the full URL in chrome, and chrome went to the google-search for the word (longurl
) that I highlighted when I launched -
- Did it not try to do anything? If so, where exactly did you save
Do you see how detailed I was when trying to help you? If you are detailed when responding to our help, it will be easier for us to help you.
Please answer all five of those questions. Also, tell me an exact path where you are willing to save
longurl.bat
. With those five answers (detailed), and with an exact path, I should be able to craft something that works for you. I will start with the big long dummy google search, so that you know it’s really working… but after that, depending on how much info you give, I might be able to help you convert the URL closer toward what you want in real life. - What browser do you want the URL to go to? Chrome? Firefox? Edge? IE? Something else?