Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 20, 2017, 02:33 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Speed It Up, or Slow It Down  (Read 451 times)

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 324
    • View Profile
    • Donate to Member
Speed It Up, or Slow It Down
« on: September 03, 2017, 04:20 AM »
Background: 

I like FBReader for reading .epubs.  Terrific program.  Except for one major omission.  For many years I've asked the developers to incorporate an auto-page-advance feature.  But no reply.

One has to manually hit page-down to go to the next page.

I can program a basic macro program to hit Page Down, repeatedly, every so many seconds -- fixed speed.  Not a big deal.

But..., there's likely a better way.

Challenge and Request:

Ideally.  Program the keypad (+) and (-) keys to increase or decrease the speed of hitting the Page Down key.  Perhaps at 5% increments or whatever.

In other words, user brings up FBReader, and some .epub (but probably would work with any such reader or word processing program, or even an image viewer).  Start auto-page-advance by hitting the keypad (+) key.  Suppose the initial default is 30 seconds per page.  If that's too slow, hit the (+) key again, and the speed to next page-turn is faster.  Hit again, and faster still.

If the 30-seconds per page is too fast, hit the keypad (-) key.  And the page-turn is then made slower.  Hit again, slower still.

Whaddya think?  Doable?

Thanks much!

Nicholas Kormanik


Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,014
    • View Profile
    • Donate to Member
Re: Speed It Up, or Slow It Down
« Reply #1 on: September 03, 2017, 06:18 AM »
With a 'little' work on WinSendKeys and WinButtons I could probably realize that.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 927
    • View Profile
    • Donate to Member
Re: Speed It Up, or Slow It Down
« Reply #2 on: September 05, 2017, 07:32 AM »
 :) Try PageDown.  The program presses PageDown every x seconds. Press Num+ and Num- to change the delay.

Save the script as PageDown.ahk. Download and install AutoHotkey to run the script.

Skrommel

;PageDown.ahk
;  Presses PageDown every x seconds. Press Num+ and Num- to change the delay.
;Skrommel @ 2017

#NoEnv
#SingleInstance,Force

delay=1000
GOTO,PAGEDOWN

NumPadSub::
delay+=1000
ToolTip,Delay: %delay%
Return

NumPadAdd::
delay-=1000
If (delay<1000)
  delay=1000
ToolTip,Delay: %delay%
Return

PAGEDOWN:
Sleep,%delay%
;IfWinNotActive,FBReader
;  Goto,PAGEDOWN
Send,{PgDn}
ToolTip,PageDown
Goto,PAGEDOWN
« Last Edit: September 05, 2017, 07:24 PM by skrommel »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,014
    • View Profile
    • Donate to Member
Re: Speed It Up, or Slow It Down
« Reply #3 on: September 05, 2017, 12:37 PM »
Great solution, thnx skrommel!

I hadn't started on extending WinButtons/WinSendKey, but I think this is what Nick needs.

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 324
    • View Profile
    • Donate to Member
Re: Speed It Up, or Slow It Down
« Reply #4 on: September 05, 2017, 05:41 PM »
Terrific, skrommel.  Works better than I was hoping for.

One change request, though.  Switch the (+) and (-) keys, so that (+) speeds up, and (-) slows down.

How does user get completely out?

Interestingly one can pause simply by clicking on the desktop.  And resume by clicking on the program being read, picking right up again.

We seem to have a definite winner here.

Why in the world hasn't this been done before.....

Well, now it is.

Thanks very much!

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,816
    • View Profile
    • Donate to Member
Re: Speed It Up, or Slow It Down
« Reply #5 on: September 05, 2017, 06:51 PM »
How does user get completely out?

Right-click the tray icon and choose Exit.

Interestingly one can pause simply by clicking on the desktop.  And resume by clicking on the program being read, picking right up again.

It's not paused.  That is, it's still sending a PageDown keystroke to whatever app/window has focus.  That said, the script can be easily modified to only work when your FBReader app is focused.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 927
    • View Profile
    • Donate to Member
Re: Speed It Up, or Slow It Down
« Reply #6 on: September 05, 2017, 07:26 PM »
@nkormanik: I swapped the Num-keys and added two lines at the bottom. If you remove the ; you can make the program only send PageDown to FPReader.