caskka

Send key to multi windows autoit

3 posts in this topic

#1 ·  Posted

$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?

Share this post


Link to post
Share on other sites



#2 ·  Posted

Sorry, double post, i cant edit the first one, what im trying is to send insert to multiple windows i have in background with that class name:ui.png 

Share this post


Link to post
Share on other sites

#3 ·  Posted

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.