Jump to content

Controlsend


Recommended Posts

Im be trying do a script to send "enter" to some windows called 1,2,3 etc, but i got it working with only one window title, need some help, please

#RequireAdmin



$key = "{enter}"



$winList = WinList("1","2","3")


   For $i = 1 to $winList[0][0]

      $title = $winList[$i][0]
      $handle = $winList[$i][1]
      $controlid = ""
      $text = ""
      ControlSend($handle,$text,$controlid,$key)


      Next
      Exit

 

Link to comment
Share on other sites

  • Developers

Think you need to open the helpfile for the WinList() function as that is not how that works.

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

#RequireAdmin

$key1 = "{^o}"
$key2 = "{o}"


AutoItSetOption("WinTextMatchMode",2)


$hWin =  WinGetHandle("WhatsApp")
$hWin2 = WinGetHandle("WhatsApp")

$controlid = ""
$text = ""

ControlSend($hWin,$text,$controlid,$key1)
ControlSend($hWin2,$text,$controlid,$key2)

Omg, didn't even remember that post, it work great

Jos just one last double =(

Its possible send two keys at same time? Trying send ctrl+o.

Tried ^o but the command dont recognize it, tried $key1 = "{lctrl}" $key2 = "{o}"   ..... but it dont send both keys at same time.

Edited by c7aesa7r
Link to comment
Share on other sites

  • Developers
3 hours ago, c7aesa7r said:

Its possible send two keys at same time? Trying send ctrl+o.

Ok let me give you another very boring answer: RTFM ! ;)

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

I really dont know  why you still here in this forum? You don't have intention to help anybody, you just want people know you're the superior, the man who knows everything and  dont need help from anyone.

Oh, obvious you're here just to tell people to go search

Link to comment
Share on other sites

  • Developers

Yea yea ...  you are right, I really should be more considerate for sensitivity of the poor soles like you around here not comprehending when I am serious or writing something with "Tongue-in-cheek" ... won't happen again 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

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...