I am writing a program similar to team viewer, which is an application that allows one computer to control other (by viewing the screen and able to move his mouse and control his keyboard).
In order to do so i have managed to share the screen of a computer with another one, and the only thing left is to enable the mouse control. The program is written in c#. The screen sharing is working using 'ffmpeg' library.
The details that i have about the second computer, in case i am the computer that is willing to "take control" of the other, is his 'ip' address.
Does anyone know how to do so or where can i found the solution?
Take a look at this: How to move mouse cursor using C#? it should get you started.
You will need to create some kind of protocol / transport to issue the remote calls. But this shows you how to interract with the mouse programaticly.
Related
I've been tasked from my workplace to create a program which, when ran, moves the cursor to over a Windows Toolbar within the Taskbar, and left-clicks it.
The rationale for this is that everyone’s using the same mapped Toolbars on their desktop and considering how tiny the button is to activate the dropdown, and how often we’re clicking on it, it becomes tedious.
I’ve made code to move the mouse cursor to a hardcoded location on the taskbar and send the left-click message, and it works pretty fantastically actually.
The reason why the above approach won’t work however is because everyone’s Toolbars are constantly changing locations (variable number mapped apps on taskbar, docking/undocking laptop from large monitors).
The only thing that’s constant is the name of the mapped Toolbars. What I really need is to determine the screen coordinates for Toolbar “x”, and then move the mouse cursor to that.
I have honestly researched this for some weeks now, looking into UI Automation (people C# one of this is deprecated but not C++), and several other related posts, but with no success. I’ve found a C++ solution, but it didn’t actually include a code example (says “do this, then do that”); plus I’m not as- proficient in C++.
Through Spy++ I’m able to see the coordinates, window handle, etc. for these Toolbars, which leads me to believe this must be possible. FindWindow won’t work because the window handle isn’t constant.
Any help you can provide on this is greatly appreciated.
I'd like to create a simple application for Android that would automate some processes that happen in different applications that I don't have under my control at all. Is there any way to get pixel color and simulate screen touch while my application runs in background?
Let's say I want to wait for a certain pixel to turn red (#FF0000), can I use GetPixel(x,y) to get the color and then simulate a screen touch event such as a swipe across the screen?
I tried to Google this but I've got nothing useful at all and now I'm quite desperate about this.
I had to search a bit for this. I was also looking for this solution.
NO ROOTING REQUIRED FOR THIS:
If you want to repeat a sequence of steps like fill a form, repeat game steps because redoing is boring, You can try : FREP Android App from Play Store(Link).
If you want to add conditional scenarios like, when you play Clash of Clans with home Wifi, turn data automatically and disable wifi ( Because Airtel Wifi in India is unpredictable and can make you loose the clan war!!) use, Macro Droid from Play Store.
You can try these as well:
Mahiro
Many apps are available based on Tasker like, Auto Input. You can maybe code/write macro to make personal solution with this Tasker App.
I have a software installed on my system which basically peeks my activity during working hours. It send a report saying how much time i was away from my system etc.
Since i m .net c# developer hence trying to break this system through my programming skills.
I have basically written up a windows form application which opens up an notepad for me and start typing some random characters into it. simultaneously it also performs some random clicks and moves the mouse cursor to give a feel that some one is on system and working even when i am not :)
I also use "SetThreadExecutionState" Pinvoke calls to keep system awake.I have also observed the User idle time and last interactivity time through "GetLastInputInfo" PInvoke system call while my mouse/keyboard are in automation process and it is also fine.
But this is not working for me. It works perfectly till 5 mins and then somehow it detects that user is not present on system.
any suggestions for the same.
Get a decompiler, crack-open the spying application and see how it is working inside. Only knowing the internal workings, you can create a "workable" any-spying program. But I would not bother with emulation of the activity, but rather spoof the way it reports to the server.
However, depending on where you live, it might be illegal to do these things and I would not recommend cheating your employer. And if spying gets on your nerves I'd also suggest to brush up your CV and start searching for a new job.
i have developed two a small apps by which i can send desktop picture with mouse position to another apps. another apps receiving the picture and shows those picture on picture box.
1) so i want to know that how could i send my all mouse keys and keyboard activity in very structure way to another apps which is sending picture.
2) when another apps will receive my mouse & keyboard activity then they will fire properly.
so please tell me how could i send mouse & keyboard activity very structure way and another things is to know that how could programmatically fire those mouse & keyboard activity on another machine. here i am developing this apps with c#. so please give me the concept as a result i can code it in c#. thanks.
Sending a picture (or any data) over a network is relatively easy.
Intercepting and re-creating Mouse and Keybord actions is entirely different. It will involve a lot of lowlevel hooking into Windows, no ready-to-use libraries.
You will have to be proficient in Interop and Marshaling, and maybe C# (.NET) just isn't the best tool for this job.
Hey.
I don't know if this is possible, but worth a shot. Say there's a third party racing game which doesn't use the mouse. Is there a way for me to create a Windows Form app which listens for mouse clicks and transfers a corresponding key to the game/active window (e.g. Left click would send the 'Up arrow' key to accelerate the Right click would decelerate by sending the 'Down arrow' key). I've looked at the SendKeys method, but it doesn't work once the game becomes the active window. Any ideas? Thanks
if the game uses DirectInput for reading the keys, then SendKeys wont work, as DI works at driver level, and SendKeys/SendInput works at API level, which may be too 'high' for the game to see. you can Hook into DirectInput, and send it commands, but its not going to be a one liner, and if you're new to DirectX, you're not going to find it fun.
I don't know if it would work, and if it is possible, but intuitively, I would check if there is some kind of AutoIt Library for C#.
As far as I know, AutoIt has no problems with sending key press events to games.
A couple of methods to integrate AutoIt to C# exist on the internet, but so far, I haven't tried one of them yet.
Still you could give it a shot
http://www.lancelarsen.com/Blog/tabid/72/EntryId/48/AutoIt-C-Helper-Library.aspx