Jump to content

Sending keystrokes to multiple windows


Andrejj
 Share

Recommended Posts

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
Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...