Giter VIP home page Giter VIP logo

Comments (3)

mzizzi avatar mzizzi commented on July 28, 2024

Interesting use case. Currently aenea doesn't provide a proxy for the Window class. This was probably skipped as each platform (windows, x11, osx) will have different properties that would somehow need to be unified.

That being said, the client does have access to this information. When dragon processes an utterance on the client it needs context from the server to decide what action to take. This context is gathered via a call to the get_context RPC on the server. If you're interested to see how this is done take a look here:
https://github.com/dictation-toolbox/aenea/blob/master/client/aenea/proxy_contexts.py

The default x11 server implementation grabs context information here:
https://github.com/dictation-toolbox/aenea/blob/master/server/linux_x11/x11_xdotool.py#L221

A quick hack for you might be to call aenea.proxy_contexts._get_context() on the client. A slightly better solution might be to add a log statement to get_context() on the server and look at server output to get your debug information. Otherwise you should look at solving your problem using aenea's plugin system. A plugin would allow you to make a custom RPC to the server to grab / format context as you please.

Good luck!

from aenea.

sol avatar sol commented on July 28, 2024

Hey, thanks for the reply. I solved this by adding a print statement to the server.

I'm away from the computer, can somebody close this?

Sent from mobile

On 20 Aug 2016, at 9:21 PM, mzizzi [email protected] wrote:

Interesting use case. Currently aenea doesn't provide a proxy for the Window class. This was probably skipped as each platform (windows, x11, osx) will have different properties that would somehow need to be unified.

That being said, the client does have access to this information. When dragon processes an utterance on the client it needs context from the server to decide what action to take. This context is gather via a call to the get_context RPC on the server. If you're interested to see how this is done take a look here:
https://github.com/dictation-toolbox/aenea/blob/master/client/aenea/proxy_contexts.py

The default x11 server implementation grabs context information here:
https://github.com/dictation-toolbox/aenea/blob/master/server/linux_x11/x11_xdotool.py#L221

A quick hack for you might be to call aenea.proxy_contexts._get_context() on the client. A slightly better solution might be to add a log statement to get_context() on the server and look at server output to get your debug information. Otherwise you should look at solving your problem using aenea's plugin system. A plugin would allow you to make a custom RPC to the server to grab / format context as you please.

Good luck!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

from aenea.

calmofthestorm avatar calmofthestorm commented on July 28, 2024

It might make sense to add a non _ method to proxy_contexts for getting the context, since we're already getting it and it should be available. Whenever I've needed this in the past, it's been of the form "Is window foo in the foreground" where foo might be a regex or something, so I just used the ProxyAppContext() and then called match() in cilent code.

Breaking window was a deliberate design decision -- Unfortunately the Dragonfly API for it is very MS Windows specific (iirc it also has operations like moving windows that are going to be window manager dependent on linux) and I could not figure out a good way to provide a cross platform implementation as I did for the other Proxy* classes.

from aenea.

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.