newautoitguy2010 0 Posted November 6, 2010 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) Share this post Link to post Share on other sites
newautoitguy2010 0 Posted November 9, 2010 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) Share this post Link to post Share on other sites
JohnOne 1,604 Posted November 9, 2010 Some controls will resist clicking unless they are the active window. Use the WinActivate() function to force the control's window to the top before using ControlClick(). AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
newautoitguy2010 0 Posted November 10, 2010 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 Share this post Link to post Share on other sites
JohnOne 1,604 Posted November 10, 2010 I have seen people ase different functions to call minimized mouse clicks with autoit.Have you tried any of them? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
kaotkbliss 146 Posted November 10, 2010 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. 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites