Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Plugin to click on screen area?

If you have a question or need help, this is the place to be.
Post Reply
jachin99
Experienced User
Posts: 614
Joined: Sat Feb 13, 2016 8:39 pm

Plugin to click on screen area?

Post by jachin99 »

I'm trying to build a Netflix remote using EG. I have the easy buttons working but I need a way to navigate through the pages where users are required to click on arrow buttons that scroll sideways. In order to do this, I'm thinking I create a macro where remote control button presses are translated into clicks on certain preconfigured areas of the screen. Which event ghost plugin would help me with this if such a plugin exists?
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Plugin to click on screen area?

Post by blaher »

Mouse
Move Absolute
Left Mouse Click
jachin99
Experienced User
Posts: 614
Joined: Sat Feb 13, 2016 8:39 pm

Re: Plugin to click on screen area?

Post by jachin99 »

Cool, thanks
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Plugin to click on screen area?

Post by kgschlosser »

even better would be to just use the webserver plugin to send the command via HTTP. then there is no question as to where the button is located. because using the mouse movements could pose an issue if the screen resolution changes at all
If you like the work I have been doing then feel free to Image
jachin99
Experienced User
Posts: 614
Joined: Sat Feb 13, 2016 8:39 pm

Re: Plugin to click on screen area?

Post by jachin99 »

Thanks, and i'll keep that in mind but for now, I only use this on one app. Just out of curiosity, in order to setup screen clicks through http commands, could I run the web server, and some kind of web client on the same machine, and the?n associate MCE remote button presses to those HTTP actions. I guess I understand the web server part but I'm not sure how I would send commands to web server from the same machine.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Plugin to click on screen area?

Post by kgschlosser »

it really depends on what exactly you are trying to click on. if it is always going to be the same and not dynamically changing then it would be really easy. otherwise you would have to code something up to using urllib to grab the page. and then parse the data for specific things you are looking for to build a "command" list if you will. set it into a dictionary with with the key being the command name and the value being the actual url that would have to be sent either using urllib once again or using the webserver plugin.

it gets to be alot more involved if the data you are loading changes. for example with netflix have it load a page of movies. read the movie titles put the titles into a list with the album art. and present a dialog you could use the remote to sift through and select you movie.

this wouldn't be all that difficult to do. but i do know that netflix does love to change things up. so there would have to be constant maintenance of the parsing code to load the information.


this is a really good idea for a plugin though. i do like it a lot. i do not have a netflix account to be able to make something up. i guess i could grab a free one and check it out.

i would need help with it from someone that knows how to properly send cookie data back and forth for the authentication bits. I am not to knowledgeable on how HTTP auth works.

this is something i would enjoy making and i think it would be used a whole lot.

let me take a look and see if there is a library for python that is already made that works properly that i might be able to use.
If you like the work I have been doing then feel free to Image
jachin99
Experienced User
Posts: 614
Joined: Sat Feb 13, 2016 8:39 pm

Re: Plugin to click on screen area?

Post by jachin99 »

I see this only staying useful in the future if it is context aware, if that makes sense so, yes it is something that needs to be configurable for different apps and webpages. I have had at one point in time or another, SlingTV, Hulu, Netflix, Vudu, and Amazon instant video. That's only the video services I've used, I have also used Spotify (Which is relatively easy to setup) and amazon music (Which has no windows app). Then if your running any kind of media center software, that will have to fit in somewhere also. Most of these apps give the user the option to view them online through a webpage, or in a store app. Some problems I run into when I configure my different macros are:

What do I use to activate the macro? There aren't any executables I can grab onto, except for Jriver. The only things I have to grab onto as triggers are 12:28:17 Task.Activated.ApplicationFrameHost, and Task.Activated.WWAHost. These actions can't tell Eventghost what program is running, and there are different log events depending on weather or not you open, close, maximize or minimize the app. Opening a web browser brings up something like Task.Activated.MicrosoftEdge but EG doesn't read the web page its on. It has taken quite a bit of experimenting but I have found some unique events for both hulu, and Netflix but the way things like the applicaton frame hose, and WWA host work is kind of like a flicker. It activates, turns on my remote, then deactivates, and turns it off, then activates again, and turns it back on so its confusing. I'm not sure if there is a way that allows eventghost to read further into what happens on the computer when these store apps are launched but that would really make this a much easier job. I can describe this in a lot more detail, and show some logs, and some of my trees if needed but righ now, I'm not on the right account, and just wanted to put this out there
jachin99
Experienced User
Posts: 614
Joined: Sat Feb 13, 2016 8:39 pm

Re: Plugin to click on screen area?

Post by jachin99 »

And at the moment I just use screen clicks to scroll sideways through vertical menus on Netflix. I have my over butons on my remote set to click the screen area for the arrows on the app, and my up and down arrows are set to a macro that triggers mouse scrolls. I sat down, and figured out just the right mouse scrolls for Netflix, but they are different for Hulu, and I haven't done those yet.
Post Reply