Jump to content

Trouble with Send click to multi windows AT SAME TIME


Nubie
 Share

Recommended Posts

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

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 by Nubie
Link to comment
Share on other sites

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

So you can winlist and wingethandle but winactivate and winwaitactive are a bridge too far?

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

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

Using the >FF.au3 UDF would make things more clearer I'm thinking.

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My 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

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

;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

  • Moderators

Nubie,

Answer this simple question: Why are you trying to click in multiple windows simultaneously? What is it that requires these simultaneous clicks? :huh:

M23

P.S. As it appears I need to spell it out nowadays - until I get an acceptable answer no-one else reply please. ;)

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

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

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 by Nubie
Link to comment
Share on other sites

  • Moderators

Nubie,

Your response to computergroove is all I needed to know - thread locked. :naughty:

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...