Suggestions on better way of handling webpage navigation

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
RobbieWilkes
Posts: 14
Joined: 27 Feb 2018, 21:52

Suggestions on better way of handling webpage navigation

23 Sep 2018, 00:37

Thought I'd pick the brains of some of the more experienced coders here.

I have been creating scripts to use on my Kodi-centric HTPCs, to allow for a consistent interface on the variety of media sites that we use, including YouTube TV, Netflix, Hulu & YouTube. From Kodi, I launch my AHK executables, which launches the desired site in Chrome kiosk mode, and then control movement / selection / playback via MCE remote controls. I have had great success, have learned a LOT, and, honestly, it works FAR better, with MUCH more functionality, than the Windows 10 "modern" apps or even the Roku channels... especially Netflix. I haven't really had the opportunity to test the Roku YouTube TV channel, but I'm betting it will compare favorably as well.

Anyway, I also had a script for Crackle, that worked fairly well, but, due to the design of the site, and a lack of any real content, I never really devoted much time or energy into making it better. I was mostly interested in having it ready for any friends / family that might want to "cut the cord' and not have access to all the resources that I do.

Well, recently Crackle became Sony Crackle, and changed the URL, and improved the interface. They also appear to have improved their content offering, so I've decided to take another whack at it. However, I'm running into some frustration with Image Search, which, quite honestly, is always a source for frustration anyway. :lol: When attempting to scroll Right & Left to view additional content, one must click on arrows (chevrons), which then loads the next page. Finding and clicking those blasted things on other sites (YouTube TV especially) has ALWAYS been annoying, and will, randomly stop working, for some reason, requiring me to collect a new images for the arrows to replace the existing ones. I can only assume that updates to either the page itself or, possibly, Chrome (since they may be provided by the browser rather than actually being images) are causing my grief. On Crackle, they are using a variety of arrows, and, thus far, no matter how I've saved the "search for" images, Image Search is just not having any luck finding ANY of them. Even, one would assume, a simple orange chevron on a gray background.

So, I was wondering if there might be a more advanced / consistent way to detect the location of a "navigation marker"? Something in the code of the page, maybe? Something that I, in my tunnel vision, am missing? Something that I might could even expand into my other scripts... which would be AWESOME? :bravo:

Anyway, if someone has some time to kill, or isn't familiar with the FREE Sony Crackle site, here's the link: https://www.sonycrackle.com/

Oh, and here's a bit of the code I've been tweaking to try and get it to detect the arrows:

Code: Select all


		ImageSearch, FoundX, FoundY, A_ScreenWidth - 250, ypos - 250, A_ScreenWidth, ypos + 250, *TransBlack *50 Images\Crackle-Arrow-Right-White.png
		If !ErrorLevel
			{
;			Tooltip Found - %FoundX% x %FoundY%
;			SetTimer, RemoveToolTip, 3000
			MouseClick Left, %FoundX%, %FoundY%
			SP(SoundMode,TiVoBloop)
			MouseMove xpos, %FoundY%
			sleep 250
			Return
			}
		ImageSearch, FoundX, FoundY, A_ScreenWidth - 250, ypos - 250, A_ScreenWidth, ypos + 250, *TransBlack *50 Images\Crackle-Arrow-Right-Gray.png
		If !ErrorLevel
			{
;			Tooltip Found - %FoundX% x %FoundY%
;			SetTimer, RemoveToolTip, 3000
			MouseClick Left, %FoundX%, %FoundY%
			SP(SoundMode,TiVoBloop)
			MouseMove xpos, %FoundY%
			sleep 250
			Return
			}
		ImageSearch, FoundX, FoundY, A_ScreenWidth - 250, ypos - 250, A_ScreenWidth, ypos + 250, Images\Crackle-Arrow-Right-Orange.png
		If !ErrorLevel
			{
;			Tooltip Found - %FoundX% x %FoundY%
;			SetTimer, RemoveToolTip, 3000
			MouseClick Left, %FoundX%, %FoundY%
			SP(SoundMode,TiVoBloop)
			MouseMove xpos, %FoundY%
			sleep 250
			Return
			}
		}
Any help or suggestions would be GREATLY appreciated.
LegzRwheelz
Posts: 56
Joined: 04 Nov 2019, 17:46

Re: Suggestions on better way of handling webpage navigation

09 Nov 2019, 08:09

Have you had success with this? I am actually looking for a little help with launching Chrome from within kodi and having sound with wasapi audio enabled in kodi. PM me if you don't mind.
LegzRwheelz
Posts: 56
Joined: 04 Nov 2019, 17:46

Re: Suggestions on better way of handling webpage navigation

03 Mar 2020, 05:23

would you mind sharing all of your code for navigating these websites using your remote?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Freddie, gongnl, mikeyww, mmflume, OrangeCat, ShatterCoder and 92 guests