Giter VIP home page Giter VIP logo

Comments (12)

GitHubRulesOK avatar GitHubRulesOK commented on July 1, 2024

You could adapt an old script I provided to jump any number of pages #3167
so simply-FY as simply Alt F J

image

if you need it automatic without ask you will need two different ones for + and -
so simply use ALT F + and Alt F - for 2 smaller scripts

EDIT give me a while to test and edit but it can be 3 for the price of one script
so

  • -10 (fixed by user) Alt F -
  • J(variable) and Alt F J
  • +10 (fixed by user) Alt F +

from sumatrapdf.

H5820121 avatar H5820121 commented on July 1, 2024

from sumatrapdf.

H5820121 avatar H5820121 commented on July 1, 2024

from sumatrapdf.

GitHubRulesOK avatar GitHubRulesOK commented on July 1, 2024

For jump + - and choice in advanced settings add or replace the viewers section with the correct location for the script
image
The Shortcut will be depending on Language so for English it is ALT +F +the underlined character so + or - or J

ExternalViewers [
	[
		CommandLine = "C:\Users\some folder\jump.cmd" %p "%1"
		Name = send Pages to &Jump
	]
	[
		CommandLine = "C:\Users\some folder\jump.cmd" -10 %p "%1"
		Name = Jump &-10 Pages
	]
	[
		CommandLine = "C:\Users\some folder\jump.cmd" +10 %p "%1"
		Name = Jump &+10 Pages
	]
]

Jump.cmd it will either for Alt + F + J ask how many pages
or for the settings amount (+10 or -10) flash a black screen as its not minimised (to hide it would require extra coding !)

@echo off
setlocal ENABLEDELAYEDEXPANSION

set "num=" & set "page=" & set "result=" & set "flag=" & set "jump=" & set "move="
rem for testing echo %1 "%~2" "%~3" &pause

if .%2==. goto help
set "first=%1"
set flag=%first:~0,1%
rem for testing echo %flag% & pause
set move=%first:~1%
if "%flag%"=="-" set "num=%2" & goto back
if "%flag%"=="+" set "num=%2" & goto forward

Title=PageJumper&color 9F&mode con cols=56 lines=8
set /a "num=%1"
if %num%==0 goto help

echo/ &echo  Current page is %num%
echo  Enter +## for jump forward pages and -## for jumpback
echo  For example current is %num% so + 10 is forward by 10
echo  Out of possible range can NOT work so +100 stays put.
echo/
set /p "jump=? Remember include + or - ? "
goto got

:back
shift & set "jump=-%move%" & goto got
exit /b

:forward
shift & set "jump=+%move%" & goto got
exit /b

:got
set /a "result=%num% %jump%"
rem for testing echo %result% &pause
if %result% LEQ 1 set "result=1"
rem for testing echo %result% &pause
"C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance -page %result% "%~2"
exit /b

:help
echo Need both a current page number and filename
pause
:eof

from sumatrapdf.

H5820121 avatar H5820121 commented on July 1, 2024

from sumatrapdf.

GitHubRulesOK avatar GitHubRulesOK commented on July 1, 2024

the shortcut is like all file menu shortcuts UNDERLINED so 3 keys ALT + מ ? or ק ? + plus or minus

from sumatrapdf.

H5820121 avatar H5820121 commented on July 1, 2024

from sumatrapdf.

GitHubRulesOK avatar GitHubRulesOK commented on July 1, 2024

The prior question I linked was where a previous "similar" request was made and rejected in that format, I have not closed this as "duplicate" and leaving open since @kjk has not commented but we will see ?

from sumatrapdf.

GitHubRulesOK avatar GitHubRulesOK commented on July 1, 2024

@kjk
A possible solution would be to have a user variable + - pages in settings that affect the <- and -> icons (currently +1 -1)

Then the key CMDpage previous next (as tied to those icons) could be user assignable if they wish ?
perhaps leave one or more of the other page commands as historic simpler +&-1

from sumatrapdf.

H5820121 avatar H5820121 commented on July 1, 2024

from sumatrapdf.

kjk avatar kjk commented on July 1, 2024

In pre-release 16374 or later (https://www.sumatrapdfreader.org/prerelease) you can do:

Shortcuts [
	[
		Cmd = CmdGoToNextPage 10
		Key = b
	]
]

This creates shortcut b for advancing 10 pages.

You can do same for CmdGoToPrevPage

See https://www.sumatrapdfreader.org/docs/Customizing-keyboard-shortcuts

from sumatrapdf.

H5820121 avatar H5820121 commented on July 1, 2024

from sumatrapdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.