How is SendPlay implemented?

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: How is SendPlay implemented?

Re: How is SendPlay implemented?

Post by R0b0t1 » 02 Nov 2017, 00:55

Thank you DojoMike, and my apologies for not responding. Post notifications are useful indeed.

I was under the impression that AHK would send events without taking over control of the desktop mouse and keyboard. Is this wrong?

This post will be updated once I am able to test, but more information on the AHK codebase would help. It seems plausible there is a distinction between the two types, but I am reading that SendInput will generate all input message types. If keybd_event and mouse_event do not do the same thing, I am very confused - the MSDN documentation implies they operate at the same level or a level below SendInput.

My goal is to provide input to a program without taking control of the desktop input devices. The ultimate usecase is similar to AutoHotkey, but the code is to be integrated with an existing project.

Re: How is SendPlay implemented?

Post by DojoMike » 21 Aug 2017, 20:15

I'm not sure where it's implemented (to be honest, I've had a hard time navigating the source too) but I think I can help you with how:

These are SendMode event / default Send
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
https://msdn.microsoft.com/en-us/librar ... s.85).aspx

And this is SendMode input / SendInput (and I think SendMode play / SendPlay)
https://msdn.microsoft.com/en-us/librar ... s.85).aspx

Hopefully this well help you with whatever you're building. Also, just out of curiosity, what are you building? I've been slowly working on a project that uses a lot of AHK's source, so it might be useful to compare notes.
mods note: added url tags to fix broken links

Re: How is SendPlay implemented?

Post by Desynchronised » 17 Aug 2017, 12:44

Sry for bumping a 4 month old thread, but im really lost in sources. Can anyone tell me in which header and sourcefile i should look for send modes implementations?

How is SendPlay implemented?

Post by R0b0t1 » 05 Apr 2017, 16:50

See this documentation.

How is SendPlay implemented? I had a look at hotkey.cpp and got the impression SetWindowsHookEx may be used but didn't find any code to that effect. Where is the implementation? Searching for SendPlay or any of the functions didn't get me very far.

Cheers, R0b0t1.

Top