Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Help with detecting end of page


  • Please log in to reply
3 replies to this topic
gonzax
  • Members
  • 120 posts
  • Last active: Jan 03 2019 04:40 PM
  • Joined: 01 Sep 2011

Ok, I need a simple script that allows me to send {pgdn} whenever I click Lbutton unless the end of the page or image is reached in which case it should send a different command, something like this:

 

~lbutton:

send {pgdn}

 

if end of the page is reached then  send {right} instead

 

How do I make the script know that the end of the page has been reached? Is there any errorlevel variable or something that tells me when I'm at the end??

 

Any help is much appreciated.



jNizM
  • Members
  • 928 posts
  • Last active: Jan 12 2018 09:23 AM
  • Joined: 01 Aug 2012
Why you dont send {End}?
[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you

Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012

You can try these:

http://autohotkey.co...ge/#entry278091

http://autohotkey.co...when-at-bottom/

; what I like about the second one is it seems a bit more universal, though definitely a less efficient way to go. It should be checking if the image on screen changes, which in itself can be tricky without using a way to save screenshots to a file to image search them. But if you sample many pixels, it can be a method that doesn't require any libraries.



gonzax
  • Members
  • 120 posts
  • Last active: Jan 03 2019 04:40 PM
  • Joined: 01 Sep 2011
jNizM, I can't use {end} because I don't want to go to the end of the page, I need to use {pgdn} at least three times before I skip to the next page.
 
Exaskryz, thanks for the links but I don't think I can use those. I'm scrolling on an image on full screen, no horizontal or vertical bars. I thought there would be an easier way to know when the end of the image is reached, something like "if errorlevel send whatever..."

 

Anyway, thanks, I'll keep thinking.