Nubie Posted September 5, 2014 Share Posted September 5, 2014 Here's my example working $title = "Just Testing" $coordx = 10 $coordy = 10 While 1 $List = WinList("[REGEXPTITLE:(.*" & $title & ".*)]") If (UBound($List) > 1) Then For $i = 1 To $List[0][0] $hWnd = WinGetHandle($List[$i][1]) ControlClick($hWnd, "", "[CLASS:GeckoPluginWindow; INSTANCE:1]", "left", 1, $coordx, $coordy) Next EndIf WEnd It's controlclick I tried send to Firefox but NOT AT SAME TIME .ControlClick, it must active each window for do, Then my trouble: Have anyway can help me send click to windows at same time or don't need active them? Link to comment Share on other sites More sharing options...
JohnOne Posted September 5, 2014 Share Posted September 5, 2014 First, you cannot send click "at same time" in AutoIt, and second, some applications simply have to be active and have focus before they will accept input. 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...
Bert Posted September 5, 2014 Share Posted September 5, 2014 Also, why has this to be done in multiple windows? Multiboxing? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Nubie Posted September 5, 2014 Author Share Posted September 5, 2014 (edited) JohnOne Yes I know with my example it can't do at same time. I was think >Multi-Theard combine with send message WM_LBUTTONDOWN (or Controlclick if can send without must active/focus windows) can help me, but I don't know how to do that. DarthCookieMonster Just my idea for make a simple auto click tool can click to multi windows at same time. My coords just are example Edited September 5, 2014 by Nubie Link to comment Share on other sites More sharing options...
JohnOne Posted September 5, 2014 Share Posted September 5, 2014 There is no multithreading with AutoIt I'm afraid, and if chrome needs activating to accept automated input, best you might do is try another browser. Nubie 1 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...
iamtheky Posted September 5, 2014 Share Posted September 5, 2014 or multiple scripts each with progressively shorter mouseclickdelay, such that the previous ones are ending their delays as the last one is being executed? ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Bert Posted September 5, 2014 Share Posted September 5, 2014 Nom....Nom...Nom....Why do you need to click multiple windows at the same time? I see you want to make the tool. I get that. WHY do you need to do it? That is what I'm asking. I'm trying to educate myself here... The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Nubie Posted September 5, 2014 Author Share Posted September 5, 2014 JohnOne Yes I'm afraid you're right, depend what window can send click boththose You was forgot some window need active/focus before send click DarthCookieMonster I saw some autoclick tool just support send click to each target window at same time, then I want try make a tool can send click to all target windows Link to comment Share on other sites More sharing options...
iamtheky Posted September 5, 2014 Share Posted September 5, 2014 So you can winlist and wingethandle but winactivate and winwaitactive are a bridge too far? ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Nubie Posted September 5, 2014 Author Share Posted September 5, 2014 the important I want must send click at same time. Then how about when a window inactive and a window activing ? Link to comment Share on other sites More sharing options...
iamtheky Posted September 5, 2014 Share Posted September 5, 2014 control click the ones you can, and hope there is only one left over that has to be active. I cant think you will have much success activating two windows at the same time. If many or all are in firefox maybe the ff.au3 UDF would assist in navigations and actions. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
MikahS Posted September 5, 2014 Share Posted September 5, 2014 Using the >FF.au3 UDF would make things more clearer I'm thinking. Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Nubie Posted September 5, 2014 Author Share Posted September 5, 2014 Firefox window just is my example, I want do on any target window but thanks your way boththose & MikahS How about with Named Pipes do WM_LBUTTONDOWN. I found this example on web expandcollapse popup;change EventMode Opt("GUIOnEventMode", 1) ;set constants myself to make sure they are correct Static $GUI_Event_Close = -3 Static $WM_LBUTTONDOWN = 0x0201 ;http://msdn.microsoft.com/en-us/library/windows/desktop/ms645607%28v=vs.85%29.aspx Static $WM_LBUTTONUP = 0x0202 ;http://msdn.microsoft.com/en-us/library/windows/desktop/ms645608%28v=vs.85%29.aspx ;create a sample GUI Global $GUI_Main = GUICreate("PostMessage Testscript", 300, 100) Global $GUI_Button1 = GUICtrlCreateButton("press this to initate a click", 5, 5, 290, 42) Global $GUI_Button2 = GUICtrlCreateButton("this should be clicked automatically", 5, 53, 290, 42) ;register events GUISetOnEvent($GUI_Event_Close, "EventHandler") GUICtrlSetOnEvent($GUI_Button1, "EventHandler") GUICtrlSetOnEvent($GUI_Button2, "EventHandler") ;Custom Events - uncomment these to check if Events occure ;GUIRegisterMsg($WM_LBUTTONDOWN, "CatchWindowMessage") ;GUIRegisterMsg($WM_LBUTTONUP, "CatchWindowMessage") ;show the gui GUISetState() ;wait for input While 1 Sleep(250) WEnd ;...^^ Func EventHandler() Switch @GUI_CtrlId Case $GUI_Button1 ;Send a MouseButtonDown Event followed by ButtonUp at coords x = 150, y = 75 (relative to client area): ;PostMessage http://msdn.microsoft.com/en-us/library/windows/desktop/ms644944%28v=vs.85%29.aspx DllCall("user32.dll", "int", "PostMessage", "HWND", $GUI_Main, "UINT", $WM_LBUTTONDOWN, "WPARAM", 0, "LPARAM", BitOR( 75 * 0x10000, BitAND(150, 0xFFFF))) Sleep(50) DllCall("user32.dll", "int", "PostMessage", "HWND", $GUI_Main, "UINT", $WM_LBUTTONUP, "WPARAM", 0, "LPARAM", BitOR( 75 * 0x10000, BitAND(150, 0xFFFF))) Case $GUI_Button2 MsgBox(0,"PostMessage Testscript","Button 2 was clicked") Case $GUI_Event_Close Exit EndSwitch EndFunc ;just to log incomming window events Func CatchWindowMessage($a_HWnD, $a_MsgID, $a_wParam, $a_lParam) ConsoleWrite("Event occured:" & @CRLF & "MsgID: " & $a_MsgID & @CRLF & "wParam: " & $a_wParam & @CRLF & "lParam: " & $a_lParam & @CRLF & @CRLF) EndFunc Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 5, 2014 Moderators Share Posted September 5, 2014 Nubie,Answer this simple question: Why are you trying to click in multiple windows simultaneously? What is it that requires these simultaneous clicks? M23P.S. As it appears I need to spell it out nowadays - until I get an acceptable answer no-one else reply please. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Nubie Posted September 5, 2014 Author Share Posted September 5, 2014 I was said I want try do a tool differ with other autoclick tool. make a autoclick tool is wrong now? Link to comment Share on other sites More sharing options...
iamtheky Posted September 5, 2014 Share Posted September 5, 2014 What fresh hell is being unleashed by clicking on multiple windows at the same time? How about this shirt "AutoIt Forums - Scrutiny is Arbitrary" ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
computergroove Posted September 5, 2014 Share Posted September 5, 2014 (edited) What fresh hell is being unleashed by clicking on multiple windows at the same time? How about this shirt "AutoIt Forums - Scrutiny is Arbitrary" <snip> but for Runescape or another game. You could also click multiple windows to multiply the earnings of a survey for money site. Edited September 5, 2014 by Melba23 URL removed Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
Nubie Posted September 5, 2014 Author Share Posted September 5, 2014 (edited) I don't know what things will use by this tool, just asking why don't have a autoclick tool can send click to target windows at same time, I want try do that computergroove Hey, it's cool, I didn't know this. That actions are exacly I want try. But is it do all in same time? Edited September 5, 2014 by Nubie Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 5, 2014 Moderators Share Posted September 5, 2014 Nubie,Your response to computergroove is all I needed to know - thread locked. boththose,If you do not like the very light touch moderation I try to apply here then you know exactly where to go. And as it is indeed "light touch" I will ignore the fact that you replied even though I specifically asked that people refrained from so doing. computergroove,Bravo for giving the idiot fresh ideas. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts