Jump to content
Sign in to follow this  
Andrejj

Sending keystrokes to multiple windows

Recommended Posts

Andrejj

Hello,

atm I am trying to create a script which sends a predefinied keystroke to multiple windows in a predifinied delay.

The most is done and it already sends the keystroke via controlsend to one window.

But afterall the key doesn't get send to the remaining windows (they have all the same name).

$INPUTTEXT = InputBox("Gib die Spamnaricht an:", "Spamnaricht:")
$INPUTTIME = InputBox("Gib den Abstand an:", "Abstand:")
HotKeySet("{F4}", "_Spam")
HotKeySet("{F5}", "_StopSpam")
Global $ACTIVE = 0
While 1
If $ACTIVE = 1 Then
  ControlSend("notepad (just an example)", "", "", $INPUTTEXT)
  Sleep($INPUTTIME)
EndIf
WEnd
Func _SPAM()
$ACTIVE = 1
EndFunc
Func _STOPSPAM()
$ACTIVE = 0
EndFunc

Someone knows what can I do to get it working?

Thanks in advance

Edited by Andrejj

Share this post


Link to post
Share on other sites
water

Could you please explain what you want to do with your script? "Spam" and "Spamnaricht" (Spam Message) sounds like something we don't want to support.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Andrejj

Yep :D

It should be some kind of a bot for a game.

I got this source myself from Youtube and didnt changed the names since they don't matter at all.

Edited by Andrejj

Share this post


Link to post
Share on other sites
Jos

Yep :D

It should be some kind of a bot for a game.

I got this source myself from Youtube and didnt changed the names since they don't matter at all.

Great, so first read our forum rules and stick to it.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Andrejj

If you talk about the FaQ I already did it.

Cant find any other thread about rules.

Share this post


Link to post
Share on other sites
water

Jos is talking about the forum rules which can be found here.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
AdmiralAlkex

If you talk about the FaQ I already did it.

Cant find any other thread about rules.

The one at the top of the forum :D Edited by AdmiralAlkex

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
Sign in to follow this  

×