Linze99

Sending q keystroke to background window

8 posts in this topic

#1 ·  Posted

Hi,

I want to send a q keystroke to the Remotedesktop window in the background whenevr I press Q in another window. This Is my code, but it doesnt work :(  :

 

#include <Misc.au3>

Local $hDLL = DllOpen("user32.dll")


While 1

   If _IsPressed ("51", $hDLL) Then
      ControlSend("192.168.178.91 - Remotedesktopverbindung", "", "", "q")
      
   EndIf
WEnd

Thx for the help :) 

Share this post


Link to post
Share on other sites



#2 ·  Posted

I would run the script from the remote desktop, then I would ControlSend() to the application window there.


I am not a lawyer.  (-_-) Xandy About  (^o^) Discord - Xandy Programmer

Share this post


Link to post
Share on other sites

#3 ·  Posted

Thanks for the fast response . The problem is the remotedesktop runs on linux

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

Basically I want to send a keystroke to a background window

Share this post


Link to post
Share on other sites

#5 ·  Posted

The Linux is rendering me powerless.  I'd really have to test against that environment to have any clue.

Can you give the remote desktop window focus without going into Linux mode?

I'm lost dude, sorry :(


I am not a lawyer.  (-_-) Xandy About  (^o^) Discord - Xandy Programmer

Share this post


Link to post
Share on other sites

#6 ·  Posted

I just treid it with sending the keystroke to the cmd.exe and it worked so the problem is the remotedektopconnection :( but thx for you help anyways

 

Share this post


Link to post
Share on other sites

#7 ·  Posted

I can automate a remote connection fine from the remote connection if it's Windows, but I've never tried a Linux remote connection.


I am not a lawyer.  (-_-) Xandy About  (^o^) Discord - Xandy Programmer

Share this post


Link to post
Share on other sites

#8 ·  Posted

It is Windows just the raspberry pi that I access via remotedesktop is linux :P

So now I have to try it with another connection to get it working

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now