Jump to content

Send key to multi windows autoit


Recommended Posts

$timeMin = 957
$timeMax = 2619
$key = "{SPACE}"

;get a list if window handles that match the text
$winList = WinList("World of Warcraft")

;run until killed/paused in the notification area
While 1 
   ;loop through the windows
   For $i = 1 to $winList[0][0]

      $title = $winList[$i][0]
      $handle = $winList[$i][1] 
      $controlid = ""
      $text = ""
      ControlSend($handle,$text,$controlid,$key)
      
     ;take a break to seem less like a macro
      $sleepTime = Random($timeMin, $timeMax)
         Sleep($sleepTime)
   Next
WEnd

 

How can i edit this script to send INSERT instead Space, and to get window class instead winlist, and to run just one time instead run until pause/kill?

Link to comment
Share on other sites

  • Developers
7 hours ago, caskka said:

World of Warcraft

@caskka,

Welcome to the AutoIt forum. :)

Unfortunately you appear to have missed the Forum rules on your way in. (there is also a link in my signature) 
Please read them now particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. :naughty:

See you soon with a legitimate question I hope. :)

Jos

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 locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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