Jump to content

Search the Community

Showing results for tags 'mouseclick inactive window'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I have several instances of testing program and i want to run concurrent test on them. So i need a way to click on the links on them. Tried controlcick and it need active window to work. I tested with simple click anywhere on window. it get registered only if window is activated. Tried Post message , Sendmessage, then dont work at all even window is activated. Func _PostMessage_Click($hWnd, $X = -1, $Y = -1, $Button = "left", $Clicks = 1, $Delay = 10) If Not IsHWND($hWnd) And $hWnd <> "" Then $hWnd = WinGetHandle($hWnd) EndIf If Not IsHWND($hWnd) Then Return SetError(1, "", False) EndIf If StringLower($Button) == "left" Then $Button = $WM_LBUTTONDOWN ElseIf StringLower($Button) == "right" Then $Button = $WM_RBUTTONDOWN ElseIf StringLower($Button) == "middle" Then $Button = $WM_MBUTTONDOWN If $Delay == 10 Then $Delay = 100 EndIf $WinSize = WinGetClientSize($hWnd) If $X == -1 Then $X = $WinSize[0] / 2 If $Y == -1 Then $Y = $WinSize[1] / 2 $User32 = DllOpen("User32.dll") If @error Then Return SetError(2, "", False) For $j = 1 To $Clicks DllCall($User32, "int", "PostMessage", "HWND", $hWnd, "uint", $Button, "WPARAM", 1, "LPARAM", _MakeLong($X, $Y)) Sleep($Delay) DllCall($User32, "int", "PostMessage", "HWND", $hWnd, "uint", $Button + 1, "WPARAM", 0, "LPARAM", _MakeLong($X, $Y)) Next DllClose($User32) Return SetError(0, 0, True) EndFunc Any expert here in this area to help? I must make it work. Because without it it takes 1 sec for window to get activated in slow machine. So i have to wait 8 sec for 8 instance. Not acceptable. Let me know. thanks very much.
×
×
  • Create New...