hybolic Posted June 9, 2012 Posted June 9, 2012 I have 4 windows of the same application open and I want to send a keystroke to all 4 of them at the same time. I've been using ControlSend but it will only send to the most recent window that had focus. I've been doing some reading, and I think I'm going to have to send the hotkey via the handles of the windows. Unfortunately, I've spent about an hour trying to get it done with no luck. Been trying with "WinList". Anyone have some working code where you can put the name of a window and it will grab the handles of all instances of that application, then send a hotkey (or anything really) to each instance of the app? Really appreciate any help, stumped here.
hybolic Posted June 9, 2012 Author Posted June 9, 2012 I'll post what code I have so far: HotKeySet("{F3}", "Toggle") Global $speed = 2000 ; Toggle run/pause Func Toggle() $Toggle = Not $Toggle While $Toggle Local $var = WinList("Diablo III") For $i = 1 To $var[0][0] If IsVisible($var[$i][1]) Then ControlSend($var[$i][1],"","","3") EndIf Next Sleep($speed) WEnd EndFunc But, it doesn't work. Not sure if I have just a typo or I'm just plain doing it wrong. Help please!
JohnOne Posted June 9, 2012 Posted June 9, 2012 WinList("Diablo III")/ThreadRules. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now