Python Library for Stimulating Mouse Position and Keyboard presses - python-3.6

Please Suggest Python Library to controll Mouse Position While Playing Games Like CS GO . I have Used PynPut ,win32api..,Both not working while playing game

The way that this works in the Win32 API is that the input commands are handled with a chain of hooks. Simply speaking the input device sends input to the OS and the OS sends input to the running applications, an application can attach itself to this hook system and choose to suppress the handled input command or pass it along the chain. In the case of some modern games, they take full control of the input chain by not passing the input commands they handle along the chain.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms644960%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

Related

Is there possibility to add ExtraVoice Commands to Voice Guidance which is running from heremaps?

Is there possibility to add Extra Voice Commands to Voice Guidance which is running from here maps?
-like Turn Right (From Here maps) something like- I want (Stop After turn Right)
NMAAudioManager is the central class that is used by SDK for iOS to modify the application AVAudioSession and play audio. It is the interface that the NMANavigationManager uses to play audio feedback such as voice instructions. You can also use NMAAudioManager to change whether hardware keys directly control HERE SDK volume, and also use it to set volume as a factor relative to the user's device volume.
The NMAAudioManager contains a queue of audio output objects. You can add to this queue by calling playOutput: with NMAAudioFileOutput, NMATTSAudioOutput, or your own NMAAudioOutput implementation. You can also use NMAAudioManager methods such as clearQueue, skipCurrentOutput, and stopOutputAndClearQueue to manage audio output in this queue.
Please refer below link for detailed implementation :
developer.here.com/documentation/ios-premium/dev_guide/topics/audio-management.html

V-USB send special command

I've created a keyboard-like with v-usb. I wonder if it's possible to send special command like on my Logitech keyboard to open Calc, increase/decrease volume, shutdown PC, etc.
It ought to be achievable. First you may need to pretend to be a Logitech keyboard, in the event that certain scan codes are only acted on if the keyboard type matches.
Second, you would need to find out what the scan code is for those keys. You might get help at Scan Codes Demystified and USB IDs.

What key is Keys.Context1 tied to in Qt/QML?

I'm currently building a proof of concept application, on windows, testing out what I can do with QML but the end result is going to run on an embedded Linux system (which I'll need to learn too). I've been working with key handling (Enter, Up, down, Left and Right etc.) and noticed that there are 4 keys marked as Context1 to 4.
In the QtQuick docs there is reference to Keys.Context1..4 with associated onPressed events but not about how they are used.
context1Pressed(KeyEvent event)
This signal is emitted when the Context1 key has been pressed. The event parameter provides information about the event.
The corresponding handler is onContext1Pressed.
How do I find out what physical keys these are bound to, or how can I specify which keys they bind to?
Qt/QML is intended for use on the desktop (Windows, Linux, Mac) and mobile platforms. I strongly suspect the contextX key events and handlers are for mobile platform use. I did some googling and you can see the intent on this Qtopia site. So you won't use these keys on Windows.
The key codes for the Keys enumeration is in CoreLib/Global/QNamespace.h; the Key_Context1..4 keys are bound to the key codes 0x01100000..3. As Tod has mentioned the keys are designed for the mobile platform, similar mobile keys are defined close to the context keys, for example: Key_Call, Key_Camera etc.
The Qt Embedded framework apparently reads the keys directly from the tty device (on Linux) and so doesn't use the OS key mappings, there is a patch that allows you to specify bindings like { Qt::Key_A, Qt::Key_Context1, Qt::Key_Unknown, Qt::Key_Unknown } from this page: http://llg.cubic.org/patches/qtegerman.html I'm not sure yet if that helps.
I hoped that I'd be able to use the OS inbuilt key mapping features, but if it is reading directly from the input device I'm not sure this is possible.
I'll update this if I learn any more.
Update
The platform we're running on has an API that deals with the keyboard device so Qt doesn't access it directly; I add a listener for each button and then send the key press event to Qt using:
QKeyEvent* key = QKeyEvent(QEvent::KeyPress, Qt::Key_Context1, Qt::NoModifier);
qApp->SendEvent(view, key).
where view is the QML DeclarativeView (or equivalent).

Detect silence while playing sound

I am developing an java-asterisk application that is calling subscribers to deliver messages. At some moments during the call, I need to monitor whether the subscriber is talking or is silent. I need to monitor that for a fairly long time (1-3 seconds) but don't want to interrupt the flow of the outgoing message.
The way I am doing it now is as below
streamFile(*file A*);
exec("WaitForSilence","300,1,1");
waitStatus=getVariable("WAITSTATUS");
streamFile(*file B*);
This works fine but it is only a 300ms detect and a 1s timeout, so from the subscriber point of view the silence between file A and file B is almost unnoticeable. But if I want to listen for longer (say 3 seconds for example) then the subscriber's experience will be ruined.
What I would need is a function similar to "WaitForSilence" but that:
runs in parallel to the script;
delivers its outcome in a variable channel with a name that I define (as there might be several calls to the function, and I need to get all the results)
I've been looking for more than aweek now and couldn't find a way to do that. Any ideas?
Code you provided will do wait, after that will do playback.
There are no way do that simple in one application.
Posible ways:
1) create c/c++ application(asterisk guru skill required) for that.
2) create enother channel, mix it with ChanSpy and in that channel do silence detect. Complexity - expert in asterisk.
Both are not so short(more then 2-3 screens of code), so can't be described in this site.
You can also try use Background application, but i am afraid it will not work too.

Dial a number and play a voice file instead of microphone input

1-we are trying to write an application which dial a number and play a voice file instead of microphone input. Is it possible in Maemo (N900)?
we can not find any ""Answering Machine " like program in N900. is this means that there is no way to play a voice file instead of Microphone input?
There is a way. Play that voice file and make pulseaudio believe it's a proper input, and disable the microphone input. For more information see my question:
How to redirect from Audio Output to Mic Input using PulseAudio?
It is possible but you need a good pulseaudio knowledge to do it, I can already set it easily on my PC using pavucontrol. Drop me a message (or better, answer my question) if you bite the bullet and decide to learn how to use pactl/pacmd.

Resources