Jump to content

Sending Mouse Clicks to minimized Remedy app.


Recommended Posts

Hi,

I really need to be able to Mouse clicks to a minimized BMC Remedy Window, aruser.exe. I have tested the following code and it works just great with mspaint.exe but why not Remedy. Does anyone know how to make it friendly to Remedy/aruser.exe? I would really appreciate it.

Thanks

#include <process.au3>

Opt("MouseClickDelay", 30) ;10 milliseconds

Opt("MouseClickDownDelay", 30) ;10 milliseconds

Func _ProcessGetWindow($PId)

If IsNumber($PId) = 0 Or ProcessExists(_ProcessGetName($PId)) = 0 Then

SetError(1)

Else

Local $WinList = WinList()

Local $i = 1

Local $WindowHandle = ""

While $i <= $WinList[0][0] And $WindowHandle = ""

If WinGetProcess($WinList[$i][0], "") = $PId Then

$WindowHandle = $WinList[$i][1]

Else

$i += 1

EndIf

WEnd

Return $WindowHandle

EndIf

EndFunc ;==>_ProcessGetWindow

$hWnd = _ProcessGetWindow(ProcessExists("aruser.exe"))

$str = StringSplit(WinGetClassList ( $hWnd),@LF)

For $i = 1 To $str[0]

If stringinstr($str[$i],"000000") Then

$str = $str[$i]

ExitLoop

EndIf

Next

ControlClick ($hWnd, "", "[CLASS:"&$str&";]", "left", 1, 76,291)

Link to comment
Share on other sites

Is there any gurus around that can help with this question? I really need to be able to send minimized mouse clicks with this app. Thank you.

Hi,

I really need to be able to Mouse clicks to a minimized BMC Remedy Window, aruser.exe. I have tested the following code and it works just great with mspaint.exe but why not Remedy. Does anyone know how to make it friendly to Remedy/aruser.exe? I would really appreciate it.

Thanks

#include <process.au3>

Opt("MouseClickDelay", 30) ;10 milliseconds

Opt("MouseClickDownDelay", 30) ;10 milliseconds

Func _ProcessGetWindow($PId)

If IsNumber($PId) = 0 Or ProcessExists(_ProcessGetName($PId)) = 0 Then

SetError(1)

Else

Local $WinList = WinList()

Local $i = 1

Local $WindowHandle = ""

While $i <= $WinList[0][0] And $WindowHandle = ""

If WinGetProcess($WinList[$i][0], "") = $PId Then

$WindowHandle = $WinList[$i][1]

Else

$i += 1

EndIf

WEnd

Return $WindowHandle

EndIf

EndFunc ;==>_ProcessGetWindow

$hWnd = _ProcessGetWindow(ProcessExists("aruser.exe"))

$str = StringSplit(WinGetClassList ( $hWnd),@LF)

For $i = 1 To $str[0]

If stringinstr($str[$i],"000000") Then

$str = $str[$i]

ExitLoop

EndIf

Next

ControlClick ($hWnd, "", "[CLASS:"&$str&";]", "left", 1, 76,291)

Link to comment
Share on other sites

I can not have this window randomly popping out in front of what im typing. Can anyone provide any example code that will test all the calls that autoit can make to minimized windows where I could substitute the window name or process and see if there are any compatiple methods with autoit. I have seen people ase different functions to call minimized mouse clicks with autoit. It would be totally awesome to get this working. Thanks

Link to comment
Share on other sites

if controlclick fails, maybe using a loop that does wingetstate and if conditions (check the help file for the ones you want) then maybe winsetstate will work.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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