B4J Question Send Key strokes to other application via B4j app?

omarruben

Active Member
Licensed User
Longtime User
Hello, is there any way to send keys (or string) from a B4j application to other app? In c# you can find the app base on the name of the open window and send the simulated key strokes. Trying to achive the same with b4j... than you
 

omarruben

Active Member
Licensed User
Longtime User
still can't find anything to select the windows app to send the keys(or string)
I saw an example in pure Java:

Runtime.getRuntime().exec("notepad");

how to achieve it on B4j?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I saw an example in pure Java:

Runtime.getRuntime().exec("notepad");
This has nothing to do with your question.

 
Upvote 0

xulihang

Active Member
Licensed User
Longtime User
Autoit came to my mind firstly:

You can send text to a window named Untitled with this code:

B4X:
AutoItX.winActivate("Untitled","")
AutoItX.send("Hello",False)
 
Upvote 0

omarruben

Active Member
Licensed User
Longtime User
Autoit came to my mind firstly:

You can send text to a window named Untitled with this code:

B4X:
AutoItX.winActivate("Untitled","")
AutoItX.send("Hello",False)

looks like this is the one I need, thank you all
 
Upvote 0
Top