Jump to content
c7aesa7r

Controlsend

Recommended Posts

c7aesa7r

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

 

Share this post


Link to post
Share on other sites
c7aesa7r

If i cant do that using winlist how could i do it?

Share this post


Link to post
Share on other sites
c7aesa7r
Posted (edited)
#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

Share this post


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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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
c7aesa7r

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

Share this post


Link to post
Share on other sites
Jos

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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

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

×