phatzilla Posted April 17, 2011 Share Posted April 17, 2011 Hey everyone, run into a bit of a jam here. Let's say i have 10 identical applications open, and i need to simultaneously hit a button (Lets say "Go") on all of them, at the same time. Is there any reliable way to do this that wont cause massive error's or anything like that? Link to comment Share on other sites More sharing options...
pieeater Posted April 17, 2011 Share Posted April 17, 2011 ControlClick might work. [spoiler]My UDFs: Login UDF[/spoiler] Link to comment Share on other sites More sharing options...
JohnOne Posted April 17, 2011 Share Posted April 17, 2011 No, autoit3 works procedural, it will click one button after the other, and perhaps very quicky, but only one at a time. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
phatzilla Posted April 17, 2011 Author Share Posted April 17, 2011 (edited) ControlClick might work. Yes, it "worked" but only clicked on one of the applications (Even though all the controls are identical) John, That's fine too, as long as its done in very rapid succession, doesn't have to be *right* at the same time, split-seconds apart works for me too. I have four of the applications open, I run this code ControlClick("[CLASS:WindowsForms10.window.8.app.0.378734a]", "", "WindowsForms10.BUTTON.app.0.378734a6","left",1) But it only clicks on the last active application. Edited April 17, 2011 by phatzilla Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 17, 2011 Moderators Share Posted April 17, 2011 Not sure where you logic is calling controlclick one time and expect it to take action on everything. Anyway, you'll need to get the handle of each individual application window ( hope that class is unique to just that apps window ). Something like ( pseudo code ): Global $ga_wlist = WinList("[CLASS:WindowsForms10.window.8.app.0.378734a]") If Not IsArray($ga_wlist) Then Exit 1 For $i = 1 To $ga_wlist[0][0] ControlClick($ga_wlist[$i][1], "", "WindowsForms10.BUTTON.app.0.378734a6","left") Next Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
phatzilla Posted April 18, 2011 Author Share Posted April 18, 2011 Thanks smoke, that seemed to have worked. Couple questions / concerns though - It seems as if they window has to be visible in order for the click to work? Weird. - Sometimes the clicks dont seem to go through, even though all the windows are stored correctly in the array, no idea why this happens.... Link to comment Share on other sites More sharing options...
wakillon Posted April 18, 2011 Share Posted April 18, 2011 Did you use WinActivate function ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
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