I see you are “off radar” (like me e-mail replies are off) but I am still bettering one of my scripts in case you or others are able to use/test it. Beta testing is progressing but slow since it needs to be tuned to work inside SumatraPDF as well as from outside, thus it needed some esoteric hybrid commands.
Anyway it seems to be functional here I am on page 11
and there are many entries with that phrase in the early contents pages (which I could use to jump forwards from) but in this case I wish to find the next one going forward. Thus with script in place I can either use the menu OR use ALTF/ to call up this dialog box. Enter (type) or paste (right click) my search term / words and it will jump to the next location where the phrase is found either on the current or following pages (in this test case page 13). If I want to search back then I can easily use < icon and the previous entry is instantly found on Page 10.
I must say though there is not much difference to using the find function as it stands internally within SumatraPDF. So the best use for this script is probably for running a scripted batched sequence based on a list of filenames.
For those that want to try it look in the search folder MyNotes/AppNotes/SumatraPDF/Addins at master · GitHubRulesOK/MyNotes OR click here to read the full commented script
For what its worth here is VirusTotal entry currently 100% clean but MS will try to block it, Best to download as plain.txt then rename it to SpdfGoTo.cmd
as with other addins it uses the SumatraPDF-settings.txt file to add as an “ExternalViewers” command
CommandLine = c:\windows\system32\cmd.exe /d /c ""%addins%\Search\SpdfGoTo.cmd" -g="GetString" page=%p "%1" "
Name = &/Find from current page
Filter = *.*
I suggest the addins are kept together as I keep them together using \SumatraPDF\addins\sub folders but for a one off just edit
%addins% above to suit your own location.
Note it is an early draft that needs some adjustments to timings so for example if a file is not already loaded in SumatraPDF session it may need when run externally either a delay added or any commands can be called twice to ensure the requested file is opened first then traversed to the targets.
The first thing you may wish to customise (apart from color) is the size of the query box so I suggest add a MODE line below :GET$ like this
:GET$ assume only needed after PAGE# for now but NAME# can dribble through
then it looks better as now much smaller
of course you could add a Color line above the Mode line to one of your own liking
I forgot to mention how powerful a cmd window can be, so for example just like in SumatraPDF double click an echoed word or strike over multiple words then right click to copy and right click again to paste so here I have added some common searches
I double click “contents” (ignore the extra end space its not copied) and for illustration I have double right clicked to paste it for my search, so just need to hit enter to go to next occurrence. You could also easily adapt the script to ask for a page number to re-start from, but there I leave the challenge other than to mention you would need to add an override in the dialog as
set /p Target="Start Page = "